On Sun, Aug 3, 2014 at 6:46 AM, Mark Summerfield <l...@qtrac.plus.com> wrote: > But perhaps what I should be asking for is for a new built-in that does what > types.SimpleNamespace() does, so that without any import you can write, say, > > foo = namespace(a=1, b=2) > # or > bar = namespace() > bar.a = 1 > > where under the hood namespace has the same behavior as > types.SimpleNamespace(). > > Naturally, I understand that adding a new name is a big deal and may be too > much to ask for beginners.
This is where you might want to consider putting some imports into site.py. That way, you can set up your own customized Python, without waiting for changes to be approved for core (which they probably won't - new builtins have a high requirement for necessity, not just "I don't want to have to type import"). ChrisA -- https://mail.python.org/mailman/listinfo/python-list