A scoping question
Gabriel Cosentino de Barros
aut_gbarros at uolinc.com
Wed Dec 29 19:30:43 CET 2004
> class NextClass:
> def __init__(self):
> for eachChild in myBaseClass.MyChilds: # <- ERROR
I never assumes globals in my classes. always pass them as parameters. it's
safer and better to understand later. Also, makes it easier to reuse the
code later on.
myBaseClass.AddChild( file2.NextClass( myBaseClass ) )
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list