Path: csiph.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Terry Reedy Newsgroups: comp.lang.python Subject: =?UTF-8?B?UmU6IERpc3RpbmN0aW9uIGJldHdlZW4g4oCcY2xhc3PigJ0gYW5kIA==?= =?UTF-8?B?4oCcdHlwZeKAnQ==?= Date: Fri, 13 May 2016 18:28:05 -0400 Lines: 41 Message-ID: References: <85eg96eebr.fsf@benfinney.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 86KcvLToShzO0jjU1RUZbg9zjdvQpEb5dY2Y+V+tS0dQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'guido': 0.05; 'tries': 0.05; 'url:pipermail': 0.05; 'type,': 0.07; 'optional': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subclass': 0.09; 'python': 0.10; 'jan': 0.11; 'around!': 0.16; 'distinction': 0.16; "guido's": 0.16; 'instantiate': 0.16; 'metaclass': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'subject:between': 0.16; 'unions': 0.16; 'unwise': 0.16; 'wrote:': 0.16; 'all,': 0.20; '(the': 0.22; 'variables.': 0.22; 'am,': 0.23; '(you': 0.23; "python's": 0.23; 'header:In- Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'pep': 0.29; 'classes': 0.30; 'class.': 0.30; 'e.g.': 0.30; 'class': 0.33; 'url:python': 0.33; 'could': 0.35; 'clear': 0.35; 'but': 0.36; 'url:org': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'things': 0.38; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'ever': 0.60; 'care': 0.60; 'received:96': 0.63; 'more': 0.63; 'to,': 0.63; 'between': 0.65; 'inherit': 0.66; 'subjectcharset:utf-8': 0.71; 'brain,': 0.84; 'received:fios.verizon.net': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: pool-96-227-207-81.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0 In-Reply-To: <85eg96eebr.fsf@benfinney.id.au> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <85eg96eebr.fsf@benfinney.id.au> Xref: csiph.com comp.lang.python:108627 On 5/13/2016 1:07 AM, Ben Finney wrote: > Howdy all, > > Ever since Python's much-celebrated Grand Unification of classes and > types, I have used those terms interchangeably: every class is a type, > and every type is a class. > > That may be an unwise conflation. With the recent rise of optional type= > annotation in Python 3, more people are speaking about the important > distinction between a class and a type. > > This recent message from GvR, discussing a relevant PEP, advocates > keeping them separate: > > PEP 484 [=E2=80=A6] tries to make a clear terminological between cl= asses > (the things you have at runtime) and types (the things that type > checkers care about). > > There's a big overlap because most classes are also types -- but no= t > the other way around! E.g. Any is a type but not a class (you can > neither inherit from Any nor instantiate it), and the same is true > for unions and type variables. [=E2=80=A6] > > > > As a Bear of Little Brain, this leaves me clueless. What is the > distinction Guido alludes to, and how are Python classes not also types= ? I suspect that one could produce a class that is not a type, in Guido's=20 meaning, with a metaclass that is not a subclass of the type class. I=20 don't otherwise know what Guido might have meant. --=20 Terry Jan Reedy