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 eryksun
Recipients Dave Jones, eryksun, ncoghlan, serhiy.storchaka
Date 2017-01-14.11:35:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484393741.25.0.132354122256.issue29270@psf.upfronthosting.co.za>
In-reply-to
Content
OK, this is completely broken and needs a more thoughtful solution than my simpleminded hack. Here's a practical example of the problem, tested in 3.5.2:

    class MyInt(ctypes.c_int):
        def __repr__(self):
            return super().__repr__()

    class Struct(ctypes.BigEndianStructure):
        _fields_ = (('i', MyInt),)

    >>> s = Struct()
    >>> s.i
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "<stdin>", line 3, in __repr__
    TypeError: super(type, obj): obj must be an instance or subtype of type
History
Date User Action Args
2017-01-14 11:35:41eryksunsetrecipients: + eryksun, ncoghlan, serhiy.storchaka, Dave Jones
2017-01-14 11:35:41eryksunsetmessageid: <1484393741.25.0.132354122256.issue29270@psf.upfronthosting.co.za>
2017-01-14 11:35:41eryksunlinkissue29270 messages
2017-01-14 11:35:41eryksuncreate