can I overload operators like "=>", "->" or something like that?

Chris Angelico rosuav at gmail.com
Fri Apr 20 14:33:00 EDT 2012


On Sat, Apr 21, 2012 at 4:21 AM, Kiuhnm
<kiuhnm03.4t.yahoo.it at mail.python.org> wrote:
> Another option is to rely on ugly pseudo-operators:
>  a .imp. b
>  a .imp (b .imp. c)

Or functions:

implies(a,b)
implies(a,implies(b,c))

That's the simplest option :) No hacks required, syntax is clear even
if the reader doesn't know what you're doing!

ChrisA



More information about the Python-list mailing list