[Python-3000] pep 3119 question (ABC)

Neal Becker ndbecker2 at gmail.com
Thu Jan 10 20:20:15 CET 2008


On reading this pep, I was not clear on one issue.

In some interface proposals (zope?), as well as in c++0x concept proposal,
there is a mechanism to specify how to adapt a given class to satisfy given
interface requirements.

For example, suppose container ABC requires a 'size'.  Suppose I have a
container-like class C, but it's size is called 'len'.  The idea is to be
able to specify, _outside of the class C_, that the size requirement is
met, and it's called 'len'.

Does pep 3119 offer that functionality?



More information about the Python-3000 mailing list