I'm having trouble understanding scope of a variable in a subclass
Gabriel Genellina
gagsl-py at yahoo.com.ar
Thu Dec 28 03:28:17 EST 2006
At Thursday 28/12/2006 01:31, Pyenos wrote:
> class Class3:
> def method():print Class1.Class2.variable #problem
In all your examples, you wrote def method() instead of def method(self).
Error messages are usually meaningful, they give you valuable
information, try to interpret them.
>Is there a correct solution in the above? Or, what is the solution?
You have not stated what is your problem, so it's difficult to give a solution.
Why do you think you may need a nested class (*not* subclass)? What
are you trying to do? I bet you don't need a nested class at all.
--
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
More information about the Python-list
mailing list