can I overload operators like "=>", "->" or something like that?
Nobody
nobody at nowhere.com
Fri Apr 20 11:50:12 EDT 2012
On Thu, 19 Apr 2012 12:28:50 -0700, dmitrey wrote:
> can I somehow overload operators like "=>", "->" or something like that?
> (I'm searching for appropriate overload for logical implication "if a then
> b")
You cannot create new operators, but you can control how existing
operators work on types which you define.
IOW, you can't define "->" or "=>", but you could define ">=" or ">>".
More information about the Python-list
mailing list