I suspect that one could produce a class that is not a type,
Say: has not a complete type definition. Think of type for example with
the distinction of strings and numbers.
Types start from low level units. A class definition must know about
strings and numbers, it inherits this knowledge
On Fri, 13 May 2016 03:07 pm, 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
Terry Reedy 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)
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
On Fri, May 13, 2016 at 1:10 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
Paul Rubin wrote:
You can't instantiate T by saying
x = T()
and expecting to get back some value that is (indeterminately) an int or
a string.
Unless it's Python 6000 running on a quantum computer...
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Ben Finney writes:
> There's a big overlap because most classes are also types -- but not
> 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
On Friday, May 13, 2016 at 10:37:34 AM UTC+5:30, 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.
On Fri, May 13, 2016 at 3:07 PM, Ben Finney wrote:
> This recent message from GvR, discussing a relevant PEP, advocates
> keeping them separate:
>
> PEP 484 […] tries to make a clear terminological between classes
> (the things you have at runtime) and types
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
10 matches
Mail list logo