The type/object distinction and possible synthesis of OOP and imperative programming languages

Terry Jan Reedy tjreedy at udel.edu
Mon Apr 15 20:52:58 EDT 2013


On 4/15/2013 1:43 PM, Antoon Pardon wrote:

> $ python3
> Python 3.2.3 (default, Feb 20 2013, 17:02:41)
> [GCC 4.7.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>  >>> class vslice (slice):
> ...   pass
> ...
> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
> TypeError: type 'slice' is not an acceptable base type
>
>
> It seems types and classes are still not mere synonyms.

Some builtin classes cannot be subclassed. There is an issue to document 
which better. That does not mean that it is not a class.





More information about the Python-list mailing list