Message172355
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). |
|
Date |
User |
Action |
Args |
2012-10-08 01:10:07 | r.david.murray | set | recipients:
+ r.david.murray, eric.snow |
2012-10-08 01:10:07 | r.david.murray | set | messageid: <1349658607.29.0.0643105543226.issue16160@psf.upfronthosting.co.za> |
2012-10-08 01:10:07 | r.david.murray | link | issue16160 messages |
2012-10-08 01:10:06 | r.david.murray | create | |
|