[Python-Dev] C-level duck typing

Nick Coghlan ncoghlan at gmail.com
Fri May 18 00:57:20 CEST 2012


I think the main things we'd be looking for would be:
- a clear explanation of why a new metaclass is considered too complex a
solution
- what the implications are for classes that have nothing to do with the
SciPy/NumPy ecosystem
- how subclassing would behave (both at the class and metaclass level)

Yes, defining a new metaclass for fast signature exchange has its
challenges - but it means that *our* concerns about maintaining consistent
behaviour in the default object model and avoiding adverse effects on code
that doesn't need the new behaviour are addressed automatically.

Also, I'd consider a functioning reference implementation using a custom
metaclass a requirement before we considered modifying type anyway, so I
think that's the best thing to pursue next rather than a PEP. It also has
the virtue of letting you choose which Python versions to target and
iterating at a faster rate than CPython.

Cheers,
Nick.
--
Sent from my phone, thus the relative brevity :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120518/e715245c/attachment.html>


More information about the Python-Dev mailing list