Re: Nested Classes and Instances

2009-07-10 Thread J. Cliff Dyer
On Fri, 2009-07-10 at 19:00 +0200, Manuel Graune wrote: > Hello, > > as an example of what I would like to achieve, think of a street > where each house has a door and a sign with a unique (per house) > number on it. I tried to model this like this: > > class House(object): > class Door(objec

Re: Nested Classes and Instances

2009-07-10 Thread Peter Otten
Manuel Graune wrote: > as an example of what I would like to achieve, think of a street > where each house has a door and a sign with a unique (per house) > number on it. I tried to model this like this: > > class House(object): > class Door(object): > def __init__(self,color): >

Nested Classes and Instances

2009-07-10 Thread Manuel Graune
Hello, as an example of what I would like to achieve, think of a street where each house has a door and a sign with a unique (per house) number on it. I tried to model this like this: class House(object): class Door(object): def __init__(self,color): self.color=color