Message285474
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 |
|
Date |
User |
Action |
Args |
2017-01-14 11:35:41 | eryksun | set | recipients:
+ eryksun, ncoghlan, serhiy.storchaka, Dave Jones |
2017-01-14 11:35:41 | eryksun | set | messageid: <1484393741.25.0.132354122256.issue29270@psf.upfronthosting.co.za> |
2017-01-14 11:35:41 | eryksun | link | issue29270 messages |
2017-01-14 11:35:41 | eryksun | create | |
|