Isn't bool __invert__ behaviour "strange"?

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Fri Sep 22 12:31:39 EDT 2006


Saizan wrote:

> (However (not x) whould be as annoying as 1-x even if a little
> more readable (if you consider lispish parentheses readable):
> Input expression: (not (not x)&(not y)!(not (z|v)))

Did you notice that you use bitwise AND and OR here? How about

not (not x) and (not y) or (not (z or v))

(or what is "!" supposed to mean?)

BTW, not's binding is stronger than and's (IIRC). So 

not (not x) and (not y)

mutates to

x and (not y)

Regards,


Björn

-- 
BOFH excuse #392:

It's union rules. There's nothing we can do about it. Sorry.




More information about the Python-list mailing list