Message 224612 - Python tracker

Message224612

Author mark
Recipients BreamoreBoy, barry, ethan.furman, mark, serhiy.storchaka, terry.reedy
Date 2014-08-03.07:02:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1407049351.58.0.772650713921.issue22123@psf.upfronthosting.co.za>
In-reply-to
Content
I changed my suggestion but did so on the mailing list instead of here:

This (importing & using types.SimpleNamespace()) is too much for children (& beginners).

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. 

I've renamed the issue to reflect this (although I don't know if that will work).

Alternatively, I (or someone) could just close the issue as "won't fix"; it was just an idea.
History
Date User Action Args
2014-08-03 07:02:31marksetrecipients: + mark, barry, terry.reedy, BreamoreBoy, ethan.furman, serhiy.storchaka
2014-08-03 07:02:31marksetmessageid: <1407049351.58.0.772650713921.issue22123@psf.upfronthosting.co.za>
2014-08-03 07:02:31marklinkissue22123 messages
2014-08-03 07:02:31markcreate