How to make a function associated with a class?

dbpokorny at gmail.com dbpokorny at gmail.com
Tue Jul 1 23:54:44 CEST 2008


On Jul 1, 2:24 pm, Kurda Yon <kurda... at yahoo.com> wrote:
>
> By the way, "type(self)" returns the name of the class to which the
> "self" belongs?
> Does "instance" return "true" if the first argument belongs to the
> class whose name is given in the second argument?

$ python
Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help(type)
[...]
>>> help(isinstance)
[...]



More information about the Python-list mailing list