[Python-ideas] Infix functions

random832 at fastmail.us random832 at fastmail.us
Mon Feb 24 18:18:16 CET 2014


On Sat, Feb 22, 2014, at 22:17, Bruce Leban wrote:
> __∩__ would complicate the tokenizer as it would have to recognize this
> exact syntax and treat it as an identifier while not allowing math symbol
> characters in other uses in an identifier. And I probably need to write
> sample['∩'] not sample.∩. Without the quotes or something along those
> lines, these look too similar:
> 
> def U(a, b): pass
> def ∪(a, b): pass

def a ∪ b:
    pass


More information about the Python-ideas mailing list