RE: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-27 Thread Prasad, Ramit
Ian Kelly wrote: > On Thu, Aug 22, 2013 at 3:26 PM, Prasad, Ramit > wrote: > > Bitswapper wrote: > >> > >> So I have a parent and child class: > >> > >> > >> class Map(object): > >> def __init__(self, name=''): > >> self.mapName = name > >> self.rules = {} > >> > >> class Rule(

Re: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-23 Thread Bitswapper
On Thursday, August 22, 2013 4:59:17 PM UTC-5, Ian wrote: > On Thu, Aug 22, 2013 at 3:26 PM, Prasad, Ramit > > <> wrote: > > > Bitswapper wrote: > > >> > > >> So I have a parent and child class: > > >> > > >> > > >> class Map(object): > > >> def __init__(self, name=''): > > >>

Re: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-23 Thread Bitswapper
On Thursday, August 22, 2013 5:00:38 PM UTC-5, Bitswapper wrote: > On Thursday, August 22, 2013 4:26:24 PM UTC-5, Prasad, Ramit wrote: > > > Bitswapper wrote: > > > > > > > > > > > > > > So I have a parent and child class: > > > > > > > > > > > > > > > > > > > > > class Map(object):

Re: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Bitswapper
On Thursday, August 22, 2013 4:26:24 PM UTC-5, Prasad, Ramit wrote: > Bitswapper wrote: > > > > > > So I have a parent and child class: > > > > > > > > > class Map(object): > > > def __init__(self, name=''): > > > self.mapName = name > > > self.rules = {} > > > > > > c

Re: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Ian Kelly
On Thu, Aug 22, 2013 at 3:26 PM, Prasad, Ramit wrote: > Bitswapper wrote: >> >> So I have a parent and child class: >> >> >> class Map(object): >> def __init__(self, name=''): >> self.mapName = name >> self.rules = {} >> >> class Rule(Map): >> def __init__(self, number): >>

RE: Can a child access parent attributes if that child added post-hoc as an attribute to the parent?

2013-08-22 Thread Prasad, Ramit
Bitswapper wrote: > > So I have a parent and child class: > > > class Map(object): > def __init__(self, name=''): > self.mapName = name > self.rules = {} > > class Rule(Map): > def __init__(self, number): > Map.__init__(self) > self.number = number This