Newbie: Inheritance of accessors

Mark McEahern marklists at mceahern.com
Tue Oct 15 21:55:08 EDT 2002


[Will Fitzgerald]
> I'm curious about accessors being inherited from parent classes. Given 
> the code that follows, and I create an instance:
> 
>  e=S()
> 
> How do I access the inherited default 'x' in e (inherited from R)?

In the most natural way imaginable, of course:

  e.x = 1
  print e.x

etc.

// m
-





More information about the Python-list mailing list