3 Suggestions to Make Python Easier For Children

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Aug 2 13:29:26 EDT 2014


On 02/08/2014 18:07, Marko Rauhamaa wrote:
> Steven D'Aprano <steve+comp.lang.python at 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




More information about the Python-list mailing list