[Pythonmac-SIG] [ann] appscript 0.4.0 released

Michael Hudson mwh at python.net
Fri Feb 13 10:49:16 EST 2004


has <hamish.sanderson at virgin.net> writes:

> Only thing still bugging me is that Python doesn't have magic methods
> for overridding 'and', 'or' and 'not' operators directly, as writing
> test expressions is clumsy without it. (Do you think we should submit
> a PEP for this?)

No.  They're control flow constructs.

What you can do is:

1) override the bitwise operators
2) create a class-or-staticmethod Term.and_(cls,*things)

Cheers,
mwh

-- 
  For every complex problem, there is a solution that is simple,
  neat, and wrong.                                    -- H. L. Mencken



More information about the Pythonmac-SIG mailing list