Re: [Tutor] namespace confusion

2006-01-18 Thread Kent Johnson
Christopher Spears wrote: > Let's say I have two classes: > > class super: > > ... def hello(self): > ... self.data1 = 'spam' > ... > class sub(super): > > ... def hola(self): > ... self.data2 = 'eggs' > ... > > Now let's look in the classes' namespaces using >

Re: [Tutor] namespace confusion

2006-01-18 Thread bob
At 02:25 PM 1/18/2006, Christopher Spears wrote: Let's say I have two classes: >>> class super: ... def hello(self): ... self.data1 = 'spam' ... >>> class sub(super): ... def hola(self): ... self.data2 = 'eggs' ... Now let's look in the classes' namespaces using __dict__:

[Tutor] namespace confusion

2006-01-18 Thread Christopher Spears
Let's say I have two classes: >>> class super: ... def hello(self): ... self.data1 = 'spam' ... >>> class sub(super): ... def hola(self): ... self.data2 = 'eggs' ... Now let's look in the classes' namespaces using __dict__: >>> sub.__dict__ {'__module__': '__main__', '__d