Assignment-in-conditional
Neil Cerutti
horpner at yahoo.com
Thu Aug 31 15:57:23 EDT 2006
On 2006-08-31, Fredrik Lundh <fredrik at pythonware.com> wrote:
> xamdam wrote:
>
>> I am not sure if this came up before, but I would love to have an
>> 'assignment-in-conditional' form in python, e.g
>
> it's a FAQ, so it has probably come up before:
>
> http://pyfaq.infogami.com/why-can-t-i-use-an-assignment-in-an-expression
Python saves me from ever making the assignment-as-conditional
mistake, but I invented the conditional-as-assignment mistake to
compensate.
--
Neil Cerutti
A billion here, a billion there, sooner or later it adds up to
real money. --Everett Dirksen
More information about the Python-list
mailing list