Want - but cannot get - a nested class to inherit from outer class

2008-03-07 Thread DBak
I want - but cannot get - a nested class to inherit from an outer class. (I searched the newsgroup and the web for this, couldn't find anything - if I missed an answer to this please let me know!) I would like to build a class for a data structure such that nodes of the data structure - of intere

Re: Want - but cannot get - a nested class to inherit from outer class

2008-03-07 Thread DBak
Sorry - code for the class should read: class Tree(object): ...class _MT(Tree): ..def isEmpty(self): return True ..def insert(self, X): return Tree._Node(X) ...class _Node(Tree): ..def isEmpty(self): return False ..def insert(self, X): return _Node(X, self, Tree._MT()) ...def __ini

Re: Want - but cannot get - a nested class to inherit from outer class

2008-03-07 Thread DBak
On Mar 7, 1:19 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Fri, Mar 7, 2008 at 3:00 PM, DBak <[EMAIL PROTECTED]> wrote: > >  However I can't do this, because, of course, the name Tree isn't > >  available at the time that the classes _MT and

Re: Want - but cannot get - a nested class to inherit from outer class

2008-03-07 Thread DBak
On Mar 7, 3:41 pm, [EMAIL PROTECTED] wrote: > On Mar 7, 4:39 pm, DBak <[EMAIL PROTECTED]> wrote: > > > On Mar 7, 1:19 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > > > > On Fri, Mar 7, 2008 at 3:00 PM, DBak <[EMAIL PROTECTED]> wrote: > >