Include optional arg in docs (nth)

This commit is contained in:
han semaj 2014-09-03 20:53:28 +12:00
parent ecc664337d
commit 6ca47df34c

View File

@ -532,11 +532,11 @@ Return True if x is None.
nth nth
--- ---
Usage: ``(nth coll n)`` Usage: ``(nth coll n &optional [default nil])``
Return the `nth` item in a collection, counting from 0. Return ``nil`` Return the `nth` item in a collection, counting from 0. Return the
if out of bounds (unless specified otherwise). Raise ``ValueError`` if default value, ``nil``, if out of bounds (unless specified otherwise).
``n`` is negative. Raise ``ValueError`` if ``n`` is negative.
.. code-block:: hy .. code-block:: hy