[Python-ideas] Anonymous namedtuples

Koos Zevenhoven k7hoven at gmail.com
Tue Apr 19 11:15:01 EDT 2016


On Tue, Apr 19, 2016 at 5:39 PM, Paul Moore <p.f.moore at gmail.com> wrote:
>
> Having done some digging just now... SimpleNamespace is basically just
> exposing for end users, the type that is used to build the
> sys.implementation object. The definition is *literally* nothing more
> than
>
>     SimpleNamespace = type(sys.implementation)
>

So, if this were added to 'collections' too, the documentation should
be moved there, and the 'types' documentation could mention this
somehow and recommend using collections.

Heck, if it gets another alias, why not give it another name too:
collections.ComplicatedNamespace ;-)

My main objection to putting SimpleNamespace in collections is that we
might want something even better in collections, perhaps
ComplexNamespace?

-Koos


More information about the Python-ideas mailing list