This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients rhettinger
Date 2020-04-14.21:23:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1586899398.31.0.504218580868.issue40284@roundup.psfhosted.org>
In-reply-to
Content
Only the magic methods need to be added:  __getitem__, __setitem__, and __delitem__, __contains__, __len__, and __iter__.

The non-dunder names risk incursion into user-space names.

>>> SimpleNamespace(username1='value1', username2='value2')
namespace(username1='value1', username2='value2')
>>> dir(_)
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'username1', 'username2']
History
Date User Action Args
2020-04-14 21:23:18rhettingersetrecipients: + rhettinger
2020-04-14 21:23:18rhettingersetmessageid: <1586899398.31.0.504218580868.issue40284@roundup.psfhosted.org>
2020-04-14 21:23:18rhettingerlinkissue40284 messages
2020-04-14 21:23:18rhettingercreate