New submission from kai zhu <kaizhu...@gmail.com>:

# 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 "<string>", line 1, in <module>
  File "a00.py", line 11, in <module>
    Foo(x = None)
TypeError: 'x' is an invalid keyword argument for this function
lethe 3 /tmp/kaizhu/Python-3.1.1:

----------
components: Interpreter Core, Library (Lib)
messages: 92406
nosy: kaizhu
severity: normal
status: open
title: bytearray.__new__ doesn't subclass
type: behavior
versions: Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6861>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to