[Python-ideas] Namespace creation with syntax short form
Morten Z
mortenzdk at gmail.com
Fri Feb 13 11:19:58 CET 2015
Namespaces are widely used in Python, but it appear that creating a
namespace
has no short form, like [] for list or {} for dict, but requires the lengthy
types.SimpleNamespace, with prior import of types.
So an idea is to make a short form with:
ns = (answer= 42)
Which resembles the types.SimpleNamespace(answer= 42), but leaves out a lot
of
typing.
Syntax for an empty namespace should then be determined.
Best regards,
MortenZdk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150213/d6e59670/attachment.html>
More information about the Python-ideas
mailing list