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 <rep...@bugs.python.org>
<http://bugs.python.org/issue16160>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to