[Python-3000] Special methods and interface-based type system
Ivan Krstić
krstic at solarsail.hcs.harvard.edu
Wed Nov 22 21:07:50 CET 2006
Bill Janssen wrote:
> Though, thinking about it some more, I don't see why *all* syntactic
> operations wouldn't just invoke the appropriate normally-named method
> on a specific ABC. "<", for instance, would presumably invoke
> "object.lessthan" (or perhaps "comparable.lessthan").
Because it's odd to have these "plumbing" methods in the same namespace
as the "porcelain" methods (the ones that implement the exposed
functionality of the class.)
The desire to keep this separation of namespaces is one of the reasons I
understand Phillip is championing `defop`, though other approaches would
for example include explicit method namespaces.
--
Ivan Krstić <krstic at solarsail.hcs.harvard.edu> | GPG: 0x147C722D
More information about the Python-3000
mailing list