On 18.02.21 05:43, Chris Angelico wrote:
On Thu, Feb 18, 2021 at 1:59 PM Ben Rudiak-Gould <benrud...@gmail.com> wrote:
It seems to me that all you'd have to do is add a line or two to the add_dict
logic in type_new so that instances of object get a dict. Then instances of
object would get a dict, and nothing else would change.
That's actually a pretty neat idea. :-)
What's so hard about using a different type?
Didnt we already discuss it somewhere else? Many programmers and
computer scientists think in "objects", "object-oriented programming" etc.
Especially since the
vanilla object repr is basically useless, but SimpleNamespace can tell
you what it's carrying.
True but it seems this have never been an issue with "lambda:0".
Orthogonal point: SimpleNamespace could easily be made
JSON-serializable (as a dict), if that would be of value.
Sounds great. :-)
Best,
Sven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/ML5IT7GLLCHPZSC5JS4GXGVQ5L43XBMN/
Code of Conduct: http://python.org/psf/codeofconduct/