invert or not ?
grante at visi.com
Sun Mar 2 05:12:19 CET 2008
On 2008-03-01, Stef Mientki <stef.mientki at gmail.com> wrote:
> from the manual I read that a bitwise inversion should be done
> by invert. But from some experiments I see that not works
> equally well.
What experiments are those?
>>> print ~0xaa, not 0xaa
>>> print ~0x55, not 0x55
>>> print ~True, not True
> Is this coincidence ?
Is what coincidence?
> (The disadvantage of invert is that I've to import operators)
No you don't.
Grant Edwards grante Yow! If elected, Zippy
at pledges to each and every
visi.com American a 55-year-old
More information about the Python-list