Hello,

On Mon, 22 Feb 2021 18:26:28 +1100
Chris Angelico <ros...@gmail.com> wrote:

> On Mon, Feb 22, 2021 at 6:08 PM Paul Sokolovsky <pmis...@gmail.com>
> wrote:
> > One explanation why SimpleNamespace is not in "collections" is
> > because ... it's not a collection. One of the basic traits of any
> > collection is that it "contains" things, and thus it can be
> > directly iterated over to traverse those contents:
> >
> > for item in collection: ...
> >
> > SimpleNamespace is not like that.  
> 
[]

> Ultimately, SimpleNamespace is useless if it can't be found. If people
> looking for this are not going to look in types, then either people
> need to be educated (good luck with that - you can't fight human
> nature), or it needs to be placed where people will find it.

Well, I tried to put all devil's advocate counter-arguments I could
come up with in the first mail, and have nothing to add. No wait, I have
another one! I hope people factored in that typing "collections" is 2.2
times harder than "types" :-D.

> Two - deque and defaultdict.

Well, I tell me to not write emails before morning coffee, but on
weekdays, that's the only time I have for it. But actually, I guess
it's only more useful in the wider context, tells us something how well
the table at the beginning of
https://docs.python.org/3/library/collections.html is structured for
quick-looking, and how logical vs random the order of rows in it
;-).

-- 
Best regards,
 Paul                          mailto:pmis...@gmail.com
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/HZVVDOAHIC2JSACQ7IMABKUXCHJJOSRT/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to