[Python-3000] abc docs (original) (raw)
Mark Summerfield mark at qtrac.eu
Wed Sep 5 13:40:43 CEST 2007
- Previous message: [Python-3000] Solaris support in 3.0?
- Next message: [Python-3000] Google spreadsheet to collaborate on backporting Py3K stuff to 2.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I may not be the first to mistakenly write
class Foo(ABCMeta):
when I meant to write
class Foo(metaclass=ABCMeta):
but I'm sure I won't be the last.
Sorry for the mistake...
Maybe attempting to register an ABCMeta subclass might lead to a more informative warning though?
---------- Forwarded Message ----------
Subject: Re: [Python-3000] abc docs Date: 2007-09-05 From: Mark Summerfield <mark at qtrac.eu> To: python-3000 at python.org
[snip]
BTW When I tried a variation of one of the ABC examples from the PEP I got this:
Python 3.0a1 (py3k, Sep 1 2007, 08:25:11)
[GCC 4.1.2 20070626 (Red Hat 4.1.2-13)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import abc
>>> class MyABC(abc.ABCMeta): pass
...
>>> MyABC.register(tuple)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
RuntimeError: maximum recursion depth exceeded in __instancecheck__
[snip]
I hope that the first one is a bug rather than intended.
-- Mark Summerfield, Qtrac Ltd., www.qtrac.eu
-- Mark Summerfield, Qtrac Ltd., www.qtrac.eu
- Previous message: [Python-3000] Solaris support in 3.0?
- Next message: [Python-3000] Google spreadsheet to collaborate on backporting Py3K stuff to 2.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]