Suggestion for "syntax error": ++i, --i

Nick Craig-Wood nick at craig-wood.com
Wed Dec 15 08:30:01 EST 2004


Richard Brodie <R.Brodie at rl.ac.uk> wrote:
>  "Terry Reedy" <tjreedy at udel.edu> wrote in message
>  news:mailman.7656.1102977457.5135.python-list at python.org...
> 
> > You could propose to the author of Pychecker that he include, if possible,
> > an option to check for and warn about '++', '--'.
> 
>  It does already.
> 
> 

$ cat plusplus.py

def main():
    i = 1
    return ++i

$ pychecker plusplus
Processing plusplus...

Warnings...

plusplus.py:4: Operator (++) doesn't exist, statement has no effect

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list