RFC -- custom operators
Marko Rauhamaa
marko at pacujo.net
Tue Aug 7 04:17:20 EDT 2018
Steven D'Aprano <steve+comp.lang.python at pearwood.info>:
> (1) This proposal requires operators to be legal identifiers,
> such as "XOR" or "spam", not punctuation like % and
> absolutely not Unicode symbols like ∉
Oh, that's a let-down. Operator symbols get their expressive value from
visual conciseness:
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
<URL: https://en.wikipedia.org/wiki/APL_(programming_language)#G
ame_of_Life>
> (If there aren't any such use-cases, then there's no need for custom
> operators.)
>
> Thoughts?
I have never felt the need for custom operators in Python code. I
believe introducing them will make it harder, not easier, to read code.
Marko
More information about the Python-list
mailing list