2.2 features

Christian Tanzer tanzer at swing.co.at
Sat Aug 4 04:39:47 EDT 2001


com-nospam at ccraig.org (Christopher A. Craig) wrote:

> An instance knows what it is, and a subclass knows who it
> inherits from, but the reverse is not true.  For this reason I think
> the correct way to spell these should be something like
> 
> instance.isinstanceof(class)
> class.issubclassof(metaclass)

Almost. Try this:

instance.isinstanceof(Class)
Class.issubclassof(Class)
Class.isinstanceof(metaclass)

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92





More information about the Python-list mailing list