This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eli.bendersky
Recipients amaury.forgeotdarc, docs@python, eli.bendersky, eric.araujo, ezio.melotti, georg.brandl, pitrou, python-dev
Date 2011-11-12.03:32:42
SpamBayes Score 5.168417e-07
Marked as misclassified No
Message-id <1321068764.24.0.892357143906.issue12875@psf.upfronthosting.co.za>
In-reply-to
Content
Amaury & Georg,

Grepping through the docs disagrees with your claims ;-) Try to grep for "\=None\]" to see what I mean. There are tons of places where default values are placed inside the brackets. For example in http://docs.python.org/library/csv.html --> look at:

    sniff(sample[, delimiters=None])

or even:

    class csv.DictReader(csvfile[, fieldnames=None[, restkey=None[, restval=None[, dialect='excel'[, *args, **kwds]]]]])

That said, I have absolutely no objections to following an accepted convention. But what is it?

I looked around, and found the following in the documentation guide:

http://docs.python.org/dev/py3k/documenting/fromlatex.html

    There is no optional command. Just give function signatures 
    like they should appear in the output:

    .. function:: open(filename[, mode[, buffering]])

       Description.

This (taken from the 3.3 guide) mentions the 2.x guideline and doesn't mention default values.

So what should I do here? According to Ezio's earlier message, the new style (without brackets) is also being used in Python 2 now. I can do the switch for the 're' module, but can we first get the convention documented somewhere?
History
Date User Action Args
2011-11-12 03:32:44eli.benderskysetrecipients: + eli.bendersky, georg.brandl, amaury.forgeotdarc, pitrou, ezio.melotti, eric.araujo, docs@python, python-dev
2011-11-12 03:32:44eli.benderskysetmessageid: <1321068764.24.0.892357143906.issue12875@psf.upfronthosting.co.za>
2011-11-12 03:32:43eli.benderskylinkissue12875 messages
2011-11-12 03:32:43eli.benderskycreate