This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jyasskin
Recipients gvanrossum, jyasskin
Date 2008-01-06.22:46:32
SpamBayes Score 0.004919578
Marked as misclassified No
Message-id <1199659595.05.0.292041718212.issue1747@psf.upfronthosting.co.za>
In-reply-to
Content
Python 2.6a0 (trunk:59791M, Jan  6 2008, 12:22:37) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import abc
[30620 refs]
>>> class A:
...   __metaclass__ = abc.ABCMeta
... 
[30650 refs]
>>> class B:
...   pass
... 
[30659 refs]
>>> issubclass(B, A)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jyasskin/src/python/trunk-abc/Lib/abc.py", line 191, in
__subclasscheck__
    if cls in subclass.__mro__:
AttributeError: class B has no attribute '__mro__'
[30701 refs]
>>> 


This causes Decimal to break in interesting ways when I make it subclass
numbers.Real. test_abc doesn't catch it because it declares
__metaclass__=type at the top level. :-(

This looks relatively easy to fix, so I'll work on a patch.
History
Date User Action Args
2008-01-06 22:46:35jyasskinsetspambayes_score: 0.00491958 -> 0.004919578
recipients: + jyasskin, gvanrossum
2008-01-06 22:46:35jyasskinsetspambayes_score: 0.00491958 -> 0.00491958
messageid: <1199659595.05.0.292041718212.issue1747@psf.upfronthosting.co.za>
2008-01-06 22:46:33jyasskinlinkissue1747 messages
2008-01-06 22:46:32jyasskincreate