Message147667
| 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. |
|