Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #108628

Re: Distinction between “class” and “type”

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.python
Subject Re: Distinction between “class” and “type”
Date Fri, 13 May 2016 16:06:35 -0700
Organization A noiseless patient Spider
Lines 16
Message-ID <87r3d536dg.fsf@jester.gateway.pace.com> (permalink)
References <85eg96eebr.fsf@benfinney.id.au> <nh5kdm$gma$1@ger.gmane.org> <mailman.655.1463178496.32212.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="52eac348160ce62b68e4635eee7cc854"; logging-data="24544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181RnwmLCWzBfli9PRfnA38"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:ncChX/YbW4KANXhO4nm1tM7chjM= sha1:+JrbixXPYiddLO4P3jGmK1AKCdo=
Xref csiph.com comp.lang.python:108628

Show key headers only | View raw


Terry Reedy <tjreedy@udel.edu> writes:
> I suspect that one could produce a class that is not a type, in
> Guido's meaning, with a metaclass that is not a subclass of the type
> class.  I don't otherwise know what Guido might have meant.

I think meant that if X is a class, then X is (usually) also a type; but
the reverse is not true.  We used to think of type and class as the same
thing in practice.  We didn't have to concern ourselves about too much
about theoretical or pedantic differences that might exist.

Now with PEP 484, the situation where X is a type but not a class is
significant enough in practice that we have to be more careful about the
distinction than we were in the Python 2 era.

There may(?) also be situations where X is a class but not a type, but I
don't think that's being considered as important as the other direction.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Distinction between “class” and “type” Terry Reedy <tjreedy@udel.edu> - 2016-05-13 18:28 -0400
  Re: Distinction between “class” and “type” Paul Rubin <no.email@nospam.invalid> - 2016-05-13 16:06 -0700

csiph-web