Baptiste Carvello <de...@baptiste-carvello.net> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13386>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to