Mark Lawrence <breamore...@yahoo.co.uk>:

> On 02/08/2014 18:07, Marko Rauhamaa wrote:
>> And the newest Python releases let you replace that with:
>>
>>     import types
>>     Object = types.SimpleNamespace
>
> With the latter being part of suggestion #3 in the original post.

Not quite. Even though Sugg. #3 would allow me to do:

   object(x=3)

this wouldn't work:

   object().x = 3

However, these would continue working:

   types.SimpleNamespace(x=3)
   types.SimpleNamespace().x = 3

Also, assuming Sugg. #3, would this work:

   object(x=3).y = 2

as this does:

   types.SimpleNamespace(x=3).y = 2


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

Reply via email to