customizing and/or/not
Simon Burton
simonb at webone.com.au
Tue Aug 12 20:43:58 EDT 2003
Just reading about the new Sets... and this came up.
Why can't we customize the and/or/not operators?
I see this as making one's own boolean type.
Is it possible?
class myBool:
def __land__(self,other):
def __lor__(self,other):
def __lnot__(self,other):
or even:
def __in__(self,item):
def __nin__(self,item):
I guess i'm wondering why we cant use and/or with lists/sets etc.
It's perhaps too funky.
Simon Burton.
More information about the Python-list
mailing list