Hello,

On Mon, 22 Feb 2021 15:51:37 +1100
Chris Angelico <ros...@gmail.com> wrote:

[]

> In my mind, the current front-runners are:
> 
> * namespace

> * ns
> * thing
> * mobject
> * bunch

Such short generic names shouldn't be used for types added so late in
the language evolution. Those are names for variables. (And lowercase in
general, with the exception of handful(!) core types).

A typical use is:

ns = SimpleNamespace()

Anyone who doesn't agree always has "import as" in their disposal (as a
more structured form of "whatever_i_want = official_descriptive_name").


> * mutableobject
> * attrobject
> 
> I've written them all in lowercase, but equally viable would be to
> spell it MutableObject etc. Half of the collections module is each way
> at the moment.

There's only one lower-case type name in "collections" - deque. Umm,
with some squinting, you can see that as "semi-core" type, like "list".

namedtuple() is not a type, it's a function. Yes, semantically it's a
type constructor, and somewhere like in Haskell it would follow naming
conventions for types, but in Python, it happens to be just a function,
and happened to follow naming conventions for functions.

So, hopefully window for the lower-case types is as closed as anytime
(last case was indeed adding "odict" as a builtin alias for
collection.OrderedDict instead of falling for 3.6 mapping algorithmic
fiasco), and all newly added types will follow the established
naming conventions.


[]

-- 
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/PIQVZRFM3IW4L4N77EHHBS7WHDF52XVH/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to