[issue16160] subclassing types.SimpleNamespace does not work
R. David Murray
report at bugs.python.org
Mon Oct 8 03:10:07 CEST 2012
New submission from R. David Murray:
Python 3.3.0+ (3.3:152d85b2da3a, Oct 6 2012, 13:17:54)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from types import SimpleNamespace
>>> class Foo(SimpleNamespace):
... pass
...
>>> y = Foo(bar=8, foo=9)
>>> y
namespace()
It doesn't work to define an __init__ method, either, which is what I really wanted to do. (I was subclassing to get the nice repr).
----------
messages: 172355
nosy: eric.snow, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: subclassing types.SimpleNamespace does not work
type: behavior
versions: Python 3.3, Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16160>
_______________________________________
More information about the Python-bugs-list
mailing list