I'm also -1 on churning the stdlib in search of a global consistency
that PEP 8 itself disavows, but this particular argument against it
doesn't make sense:

On Thu, Nov 11, 2021 at 9:14 AM Paul Moore <p.f.mo...@gmail.com> wrote:
> To examine some specific cases, lists are a type, but list(...) is a
> function for constructing lists. The function-style usage is far more
> common than the use of list as a type name (possibly depending on how
> much of a static typing advocate you are...). So "list" should be
> lower case by that logic, and therefore according to PEP 8. And str()
> is a function for getting the string representation of an object as
> well as being a type - so should it be "str" or "Str"? That's at best
> a judgement call (usage is probably more evenly divided in this case),
> but PEP 8 supports both choices. Or to put it another way, "uniform"
> casing is a myth, if you read PEP 8 properly.

Any type can be called to construct an instance of that type. If I
define a class Foo, I create an instance of Foo by calling `Foo(...)`.
`list` and `str` are no different; I can create an instance of the
type by calling it. This doesn't mean they are "both a type and a
function" in some unusual way, it just means that we always call types
in order to construct instances of them.

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

Reply via email to