On 02/08/2014 18:07, Marko Rauhamaa wrote:
Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info>:

Marko Rauhamaa wrote:
__setattr__ could create __dict__ belatedly.

Are we designing Son Of PHP, or a sensible language? *wink*

If object.__setattr__ did this, then we're left with two equally
horrible choices:

Not a huge issue. Only mildly annoying to have to create:

    class Object: pass

in every application.

And the newest Python releases let you replace that with:

    import types
    Object = types.SimpleNamespace


Marko


With the latter being part of suggestion #3 in the original post.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to