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
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to