kutsurak / python-bitstring

Automatically exported from code.google.com/p/python-bitstring
0 stars 0 forks source link

Don't futz with __new__, preventing effective subclassing of BitArray #121

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there,

It's difficult to subclass BitArray at the moment, due to the magic that 
happens in __new__.

It would be lovely if the following evaluated to True:

class MyBitArray(bitstring.BitArray): pass
MyBitArray().__class__ == MyBitArray

Cheers,
N

Original issue reported on code.google.com by n...@whiteink.com on 2 Feb 2012 at 4:38

GoogleCodeExporter commented 9 years ago
I see your point - never noticed that before. I probably am being too clever 
for myself in __new__. Should be fixed in the next version.

Original comment by dr.scott...@gmail.com on 2 Feb 2012 at 4:50

GoogleCodeExporter commented 9 years ago
Fixed in revision 951.

Original comment by dr.scott...@gmail.com on 6 Feb 2012 at 5:10