[issue4564] bytearray.fromhex doesn't respect bytearray subclass

2008-12-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The same kind of request has been rejected several times: issue2267, issue1562. The explanation given is here: http://mail.python.org/pipermail/python-list/2005-January/300791.html """a base class has no idea what requirements may exis

[issue4564] bytearray.fromhex doesn't respect bytearray subclass

2008-12-06 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: The following code says it all: >>> class B(bytearray): pass ... >>> b = B.fromhex("0c0a") >>> b bytearray(b'\x0c\n') >>> isinstance(b, B) False -- messages: 77130 nosy: pitrou priority: normal severity: normal status: open title: