Stef Mientki wrote:
> hello,
> 
> 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.
> Is this coincidence ?
> 
> (The disadvantage of invert is that I've to import operators)
> 
Bitwise inversion is performed by the "~" operator. I think your 
experimentation has been inadequate:

 >>> for i in range(-10000, 10000):
...     if (not i) == (~i):
...         print i
...
-1
 >>>

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to