(Feb-19-2017, 04:37 AM)micseydel Wrote: In Python, anytime a variable is referenced, it will be looked for in the local scope, then enclosing scope, up to global. Methods are no different than functions in this way.
but if you want to assign a new value to a variable ...
interesting that
self.foo = 1
can create a new attribute in a class instance but setattr() is needed in other cases.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.