inherit from data type

Ulrich Eckhardt eckhardt at satorlaser.com
Tue May 11 04:47:35 EDT 2010


Richard Lamboj wrote:
> i want to inherit from a data type. How can i do this? Can anyone explain
> more abou this?

Other than in e.g. C++ where int and float are special types, you can
inherit from them in Python like from any other type. The only speciality
of int, float and string is that they are immutable.

> How knows python that it is a float, or a string? 

I'm not actually sure I understand this question. If you derive from float,
Python obviously knows that you derive from float....


Uli

-- 
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932




More information about the Python-list mailing list