Re: Distinction between “class” and “type”

Andreas Röhler andreas.roehler at online.de
Sat May 14 03:25:57 EDT 2016


> 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 from the syntax of 
language. Even an empty class must be constructed.

Types may be composed resp derived from other types. Any class finely 
will constitute a type composed by its body.

In case an definition may used for example equally for addition or 
string-concatenation, ambiguity constitutes a composed resp. derived 
type by themselves.

In general terms: the type tells the structure of arguments it receives 
alongside with the way, it deals with them.






More information about the Python-list mailing list