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 ncoghlan
Recipients Dave Jones, eryksun, ncoghlan, serhiy.storchaka
Date 2017-01-14.08:20:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484382058.73.0.704788643812.issue29270@psf.upfronthosting.co.za>
In-reply-to
Content
Eryk's diagnosis sounds right to me, and the suggested patch will get this back to working as well as it did in Python 3.5.

However, it's worth noting that that state itself was already broken when it comes to zero-argument super() support on the type definition with reversed endianness:

```
>>> import ctypes as ct
>>> class SuperText(ct.c_uint32):
...     def __repr__(self):
...         return super().__repr__()
... 
>>> SuperText.__ctype_le__(1)
<SuperText object at 0x7fde526daea0>
>>> SuperText.__ctype_be__(1)
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
```

The apparently nonsensical error message comes from both the original type and the type with swapped endianness having the same representation:

>>> SuperText.__ctype_le__
<class '__main__.SuperText'>
>>> SuperText.__ctype_be__
<class '__main__.SuperText'>
History
Date User Action Args
2017-01-14 08:20:58ncoghlansetrecipients: + ncoghlan, serhiy.storchaka, eryksun, Dave Jones
2017-01-14 08:20:58ncoghlansetmessageid: <1484382058.73.0.704788643812.issue29270@psf.upfronthosting.co.za>
2017-01-14 08:20:58ncoghlanlinkissue29270 messages
2017-01-14 08:20:58ncoghlancreate