[Python-ideas] a simple namespace type

Sven Marnach sven at marnach.net
Sun May 27 18:08:26 CEST 2012


Calvin Spealman schrieb am Sun, 27. May 2012, um 09:42:26 -0400:
> - record
> - flexobject
> - attrobject
> - attrdict
> - nameddict
> - namedobject

Since the proposed type is basically an `object` allowing attributes,
another option would be `attrobject`.

Adding an `__iter__()` method, as proposed earlier in this thread,
seems unnecessary; you can simply iterate over `vars(x)` for an
`attrobject` instance `x`.

Cheers,
    Sven



More information about the Python-ideas mailing list