Message147667
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. |
|
Date |
User |
Action |
Args |
2011-11-15 13:40:42 | baptiste.carvello | set | recipients:
+ 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:42 | baptiste.carvello | link | issue13386 messages |
2011-11-15 13:40:42 | baptiste.carvello | create | |
|