Python 3.5 abc.py bug distilled

This commit is contained in:
rocky
2016-05-05 04:11:53 -04:00
parent 6765a2ea97
commit 05733c6171
5 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
# Python3.5 bug from abc.py:
# stmt ::= LOAD_CLOSURE RETURN_VALUE RETURN_LAST
#
# And this gets ignored.
# Note this is similar to 06_classbug.py but not the same.
# classmethod -> object
class abstractclassmethod(classmethod):
__isabstractmethod__ = True
def __init__(self, callable):
callable.__isabstractmethod__ = True
super().__init__(callable)