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 baptiste.carvello
Recipients baptiste.carvello, docs@python, eli.bendersky, eric.araujo, eric.smith, eric.snow, ezio.melotti, georg.brandl, petri.lehtinen, terry.reedy
Date 2011-11-15.13:40:41
SpamBayes Score 1.6792521e-08
Marked as misclassified No
Message-id <4EC26BD0.7050004@baptiste-carvello.net>
In-reply-to <1321300282.25.0.688847778889.issue13386@psf.upfronthosting.co.za>
Content
Le 14/11/2011 20:51, Eric Snow a écrit :
> 
> So would it be worth the effort to identify each such place in the built-ins/stdlib and eventually change them all?  I've seen support for doing so in other tracker issues and think it's a good idea personally.
> 

I ran a few grep searches from the root of a recent hg tip:

1) grep -n -r --include=*.py --include=*.c --exclude="topics.py" -E
'.+\(.*\[[[:space:]]*,.*\].*\)' .

This looks for variants of "function(args [, opt])". There were 231
hits, I caught no false positives.

2) grep -n -r --include=*.py --include=*.c --exclude="topics.py" -E
'.+\(.*\[.*,[[:space:]]*\].*\)' .

As this pattern is valid Python syntax, I got mostly false positives,
but also a few interesting cases such as "range([start,] stop[, step])"
or "islice(seq, [start,] stop [, step])"

I'm afraid those last examples cannot be described with valid Python syntax.
History
Date User Action Args
2011-11-15 13:40:42baptiste.carvellosetrecipients: + baptiste.carvello, georg.brandl, terry.reedy, eric.smith, ezio.melotti, eric.araujo, eli.bendersky, docs@python, eric.snow, petri.lehtinen
2011-11-15 13:40:42baptiste.carvellolinkissue13386 messages
2011-11-15 13:40:42baptiste.carvellocreate