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

Robert Collins robertc at robertcollins.net
Thu May 12 23:04:42 EDT 2016


On 13 May 2016 at 15:00, Chris Angelico <rosuav at gmail.com> wrote:
> On Fri, May 13, 2016 at 12:52 PM, 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? (I know, nobody's listening, everyone's too
>> busy arguing that Path should inherit from str. :-)
>
> ISTM Type is the more obvious name here. Python doesn't have class
> objects any more than it has def objects - it has functions and types.
>
> ChrisA

+1, FWIW - I don't generally chime in with Me Toos, but since Guido is asking :)

-Rob


-- 
Robert Collins <rbtcollins at hpe.com>
Distinguished Technologist
HP Converged Cloud


More information about the Python-ideas mailing list