Augmented assignment (ie. += and friends) for Python!

Thomas Wouters thomas at xs4all.net
Sat May 13 09:03:22 EDT 2000


On Fri, May 12, 2000 at 07:30:47PM +0100, Michael Hudson wrote:

> (does C have &&= and ||=?  I can't remember, and Python's not getting
> them anyway).

No, C doesn't have them, because the logical operators always return 1 or 0,
*not* one of their operands, as 'and' and 'or' do in Python. Adding '&&='
('and=' ?) and '||=' would be plain silly, because the logical operators do
*not* modify anything.

For what it's worth, I did try your patch :) It worked fine, but i haven't
had the time to test it thoroughly yet.

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




More information about the Python-list mailing list