[Python-Dev] Why not support user defined operator overloading ? (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Sep 30 02:53:08 CEST 2013


Steven D'Aprano wrote:

there is no need to define new syntax at runtime. The parser doesn't need to know the operator's action until runtime

It does need to know the operator's precedence and associativity, though, which means either declaring it somewhere, or having some kind of fixed rule.

-- Greg



More information about the Python-Dev mailing list