Newbie: Inheritance of accessors

Mark McEahern marklists at mceahern.com
Wed Oct 16 03:55:08 CEST 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