homepage

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 daniel.urban
Recipients Darren.Dale, benjamin.peterson, daniel.urban, dsdale24, eric.araujo, ncoghlan, stutzbach
Date 2011年06月11日.07:11:30
SpamBayes Score 1.2236231e-06
Marked as misclassified No
Message-id <1307776291.64.0.133148733288.issue11610@psf.upfronthosting.co.za>
In-reply-to
Content
It doesn't work with staticmethod:
>>> import abc
>>> 
>>> class C(metaclass=abc.ABCMeta):
... @staticmethod
... @abc.abstractmethod
... def foo(x):
... raise NotImplementedError()
... 
>>> class D(C):
... @staticmethod
... def foo(x):
... return x + 1
... 
>>> D()
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
TypeError: Can't instantiate abstract class D with abstract methods foo.__func__
>>>
History
Date User Action Args
2011年06月11日 07:11:31daniel.urbansetrecipients: + daniel.urban, ncoghlan, benjamin.peterson, stutzbach, eric.araujo, dsdale24, Darren.Dale
2011年06月11日 07:11:31daniel.urbansetmessageid: <1307776291.64.0.133148733288.issue11610@psf.upfronthosting.co.za>
2011年06月11日 07:11:31daniel.urbanlinkissue11610 messages
2011年06月11日 07:11:30daniel.urbancreate

AltStyle によって変換されたページ (->オリジナル) /