Commits

Walter Dörwald  committed c4654fd

Switch docstring from XIST to ReST for _misc.c.

  • Participants
  • Parent commits 7008fea

Comments (0)

Files changed (1)

File src/ll/_misc.c

 /*
-** Copyright 2007 by LivingLogic AG, Bayreuth, Germany.
-** Copyright 2007 by Walter Dörwald
+** Copyright 2007-2008 by LivingLogic AG, Bayreuth, Germany.
+** Copyright 2007-2008 by Walter Dörwald
 **
 ** All Rights Reserved
 **
 
 
 PyDoc_STRVAR(item_doc,
-"Returns the <arg>index</arg>'th element from the iterable. <arg>index</arg> may be\n\
+"Returns the :var:`index`'th element from the iterable. :var:`index` may be\n\
 negative to count from the end. E.g. 0 returns the first element produced by\n\
-the iterator, 1 the second, -1 the last one etc. If <arg>index</arg> is negative\n\
+the iterator, 1 the second, -1 the last one etc. If :var:`index` is negative\n\
 the iterator will be completely exhausted, if it's positive it will be\n\
-exhausted up to the <arg>index</arg>'th element. If the iterator doesn't produce\n\
-that many elements <class>IndexError</class> will be raised, except when\n\
-<arg>default</arg> is given, in which case <arg>default</arg> will be returned.");
+exhausted up to the :var:`index`'th element. If the iterator doesn't produce\n\
+that many elements :exc:`IndexError` will be raised, except when\n\
+:var:`default` is given, in which case :var:`default` will be returned.");
 
 
 static PyObject *first(PyObject *self, PyObject *args)
 
 
 PyDoc_STRVAR(first_doc,
-"Returns the first element from the iterable. If the iterator doesn't produce\n\
-any elements <class>IndexError</class> will be raised, except when\n\
-<arg>default</arg> is given, in which case <arg>default</arg> will be returned.");
+"Return the first element from the iterable. If the iterator doesn't produce\n\
+any elements :exc:`IndexError` will be raised, except when :var:`default` is\n\
+given, in which case :var:`default` will be returned.");
 
 
 static PyObject *last(PyObject *self, PyObject *args)
 
 
 PyDoc_STRVAR(last_doc,
-"Returns the last element from the iterable. If the iterator doesn't produce\n\
-any elements <class>IndexError</class> will be raised, except when\n\
-<arg>default</arg> is given, in which case <arg>default</arg> will be returned.");
+"Return the last element from the iterable. If the iterator doesn't produce\n\
+any elements :exc:`IndexError` will be raised, except when :var:`default` is\n\
+given, in which case :var:`default` will be returned.");
 
 
 static PyObject *count(PyObject *self, PyObject *iterable)
 };
 
 static char module__doc__[] =
-"This module contains the functions item(), first(), last() and count().";
+"This module contains the functions :func:`item` :func:`first`, :func:`last` and
+:func:`count`.";
 
 
 PyMODINIT_FUNC