Augmented assignment (ie. += and friends) for Python!
Courageous
jkraska1 at san.rr.com
Sat May 13 10:16:39 EDT 2000
Thomas Wouters wrote:
>
> 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.
I think the originator meant bitwise operators.
C/
More information about the Python-list
mailing list