[Python-ideas] Adding Type[C] support to PEP 484 and typing.py

Nick Coghlan ncoghlan at gmail.com
Fri May 13 00:14:35 EDT 2016


On 13 May 2016 at 12:52, Guido van Rossum <guido at python.org> wrote:
> Great. We'll be able to move this very quickly once we decide whether it
> should be called Type[C] or Class[C]. The original proposal is Type[C], and
> it's nice because it's a pun on `type`, just like Tuple[...] is a pun on
> `tuple` (and similar for List etc.). But OTOH it really annotates a class
> object, not an abstract type. I still prefer Type[C] -- anyone want to argue
> that we're making a mistake?

+1 for Type - it's the typical term used by Python developers, even
though it's technically a misnomer from a type theory perspective.

My intuition is that being consistent with the misnomer will be less
confusing overall, based on the assumption that many more Pythonistas
will be familiar with the type() builtin than will be familiar with
formal type theory.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list