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 bup
Recipients bup
Date 2017-03-30.06:36:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za>
In-reply-to
Content
The simplest example:

def mydec(cls):
    return type(cls.__name__, cls.__bases__, dict(cls.__dict__))

@mydec
class MyList(list):
    
    def extend(self, item):
        super(MyList, self).extend(item)
        
    def insert(self, index, object):
        super().insert(index, object)

>>> lst = MyList()
>>> lst.extend([2,3])
>>> lst.insert(0, 1)
TypeError: super(type, obj): obj must be an instance or subtype of type
>>> lst
[2, 3]

If this is intended behavior, at least the error message could be fixed.
History
Date User Action Args
2017-03-30 06:36:49bupsetrecipients: + bup
2017-03-30 06:36:49bupsetmessageid: <1490855809.89.0.267666010996.issue29944@psf.upfronthosting.co.za>
2017-03-30 06:36:49buplinkissue29944 messages
2017-03-30 06:36:49bupcreate