Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:    http://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com
">

(original) (raw)

I don't think this is quite true.
 
    ++var  and \--var
are legal albeit redundant expressions that equal var
 
    var++ and var--
cause a SyntaxError, as they should.
 
Rob
 
 
----- Original Message -----
From: Wee Binn
To: python-dev@python.org
Sent: Wednesday, September 23, 2009 4:47 AM
Subject: \[Python-Dev\] surprised to "++" and "--"

Hi,
    I know that there is no "++" or "--" operator in python, but if "var++" or something like that in my code(you know, most of C/C++ coders may like this),there is nothing wrong reported and program goes on just like expected!!
    This is obscure, maybe a bug.


\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/rob.cliffe%40btinternet.com