On Jun 7, 1:37 pm, Kay Schluehr <[EMAIL PROTECTED]> wrote:
> I was reading PEP 3119 (http://www.python.org/dev/peps/pep-3119/) and
> have done some experiments using Python 3.0a5. Now I'm somewhat
> puzzled about the purpose of the ABCMeta.register() method.
>
> One can use the register() method to register any class as a virtual
> subclass of any ABC. For example one can register `int` on `Iterable`
> and therefore it is a subclass which is confirmed in the issubclass
> check. What is that good for?

It's mostly good for types created in C, where it's hard to inherit a
class. For example, builtin types register them selves under some ABCs
in collections.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to