[Python-Dev] the not operator (and the __not__ special method)

Mark McEahern marklists@mceahern.com
Thu, 3 Oct 2002 16:59:09 -0500


> > And just for symmetry considerations, given that python has the
> > pairs (and, &) and (or, |), does anybody considering to introduce
> > the ! operator, so you can have the equivalent (not, !) too?
> 
> There is a bitwise not operator: ~
> 
> >>> ~2
> -3

Yeah, isn't ! reserved for shouting anyway?

// m