Newbie question: unexpected diagnostic when subclassing

Jeff Melvaine jeffm52 at rivernet.com.au
Tue Jul 30 20:28:08 EDT 2002


I think I must be doing something basically wrong, but ... ???

I'm running Python 2.1 on Windows 98.  I create a file x.py in which I
declare

class x:
  ...

The basic operations of this class work OK.

I then create a file y.py in which I declare

class y(x):
  ...

When I try to create an instance of y, I get the diagnostic

TypeError: base is not a class instance

referenced to the definition of class y.  In this context, does x really
have to be a variable whose value is an instance of class x?

Thanks in advance.

Jeff





More information about the Python-list mailing list