A Bug By Any Other Name ...

Chris Rebert clp2 at rebertia.com
Sun Jul 5 22:45:39 EDT 2009


On Sun, Jul 5, 2009 at 7:32 PM, Lawrence
D'Oliveiro<ldo at geek-central.gen.new_zealand> wrote:
> I wonder how many people have been tripped up by the fact that
>
>    ++n
>
> and
>
>    --n
>
> fail silently for numeric-valued n.

Given that C-style for-loops are relatively infrequent in Python and
are usually written using range() when they are needed, it's probably
not that prevalent a problem.
I suppose the lexer could be changed to make ++ and -- illegal...

Cheers,
Chris
-- 
http://blog.rebertia.com



More information about the Python-list mailing list