[issue6861] bytearray.__new__ doesn't subclass

2009-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: That's because bytearray is mutable, so it uses __init__ instead of __new__. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker __

[issue6861] bytearray.__new__ doesn't subclass

2009-09-07 Thread Brandon Height
Brandon Height added the comment: This behavior is also found inside of version 2.6.2 -- nosy: +lasko ___ Python tracker ___ ___ Pytho

[issue6861] bytearray.__new__ doesn't subclass

2009-09-07 Thread kai zhu
New submission from kai zhu : # a00.py parent = bytearray # fails # parent = bytes # works # parent = str # works class Foo(parent): def __new__(klass, x): return parent.__new__(klass, x) Foo(x = None) $ python3.1 -c "import a00" Traceback (most recent call last): File "", line 1