On Monday 23 November 2009 10:49:38 Emile Anclin wrote:
> Hello,
> 
> On Wednesday 18 November 2009 22:19:26 James Lingard wrote:
> > x = y = 0
> > print ++x
> >
> > ************* Module pylint-misc
> > E9800:  2: Use of the non-existent ++ operator
> 
> I have a little doubt about this message. I would not say, there is a use
> of an "non-existent operator".
> 
> It isn't an error, simply it will be considered as "(+(+a))" :

I fail to see a single case where it makes sense to write ++x in Python. Sure 
it is syntactically correct but:

* in the best case it's a typo (the author wanted to write +x  and typed + 
twice)
* in the worst case, the author is a C programmer and meant something else
* it is anyway visually confusing and disgraceful. 

Therefore, imo it deserves an Error.

-- 
Alexandre Fayolle                              LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian:  http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
Informatique scientifique:               http://www.logilab.fr/science
_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to