Terry Hancock wrote: > One thing that I also think would be good is to open up the > operator set for Python. Right now you can overload the > existing operators, but you can't easily define new ones. > And even if you do, you are very limited in what you can > use, and understandability suffers.
One of the issues that would need to be dealt with in allowing new operators to be defined is how to work out precedence rules for the new operators. Right now you can redefine the meaning of addition and multiplication, but you can't change the order of operations. (Witness %, and that it must have the same precedence in both multiplication and string replacement.) If you allow (semi)arbitrary characters to be used as operators, some scheme must be chosen for assigning a place in the precedence hierarchy. -- http://mail.python.org/mailman/listinfo/python-list