why no ++?

Stefan Schwarzer s.schwarzer at ndh.net
Sat Aug 11 18:37:52 EDT 2001


Hi Alex

Alex Martelli schrieb:
> "Christopher A. Craig" <com-nospam at ccraig.org> wrote in message
> news:mailman.997122491.16083.python-list at python.org...
>     ...
> > I had always thought the reason for not having i++ was because, in
> > general, each line of Python code can have at most one lvalue.
> 
> I'm not sure what you mean, since 'lvalue' is not a Python
> concept, but...:
> 
>     a=b,c,d=e='wow'

Nice, but seems like "obfuscated Python" to me ;-)

>>> a,b,c,d,e
('wow', 'w', 'o', 'w', 'wow')

I haven't yet figured out how it works. Could you please add parantheses to
the above expression or clarify otherwise how it works?

Stefan



More information about the Python-list mailing list