En Thu, 25 Sep 2008 17:04:59 -0300, Arash Arfaee <[EMAIL PROTECTED]>
escribió:
Thank you very much Gerhard and Terry.
I am trying to add undefined state to some Boolean operator. Here is
what I
tried to do and It is not working:
class _3ph:
def __init__(self):
self.value = 0
Thank you very much Gerhard and Terry.
I am trying to add undefined state to some Boolean operator. Here is what I
tried to do and It is not working:
class _3ph:
def __init__(self):
self.value = 0
def __xor__(self,item):
if self.value==2 or item==2:
return 2
Arash Arfaee wrote:
Hi All,
Is there anyway to add new in-place operator to Python? Or is there any
way to redefine internal in-place operators?
Python does not have 'in-place operators'. It has 'augmented assignment
statements' that combines a binary operation with an assignment. *If*
th
Arash Arfaee wrote:
Hi All,
Is there anyway to add new in-place operator to Python?
You can't create new syntax, like %=
Or is there any way to redefine internal in-place operators?
What you can do is give your objects the ability to use these operators.
See http://docs.python.org/ref/nu
Hi All,
Is there anyway to add new in-place operator to Python? Or is there any way
to redefine internal in-place operators?
Thanks.
Cheers,
Arash
--
http://mail.python.org/mailman/listinfo/python-list