Python: Accessing Class Variables From Other Class Variables Within The Class - Possible?
is it possible in python to address class variables from other class variables within the same class? My problem is: I am trying to prepare some static code, that would look like t
Solution 1:
No, there shouldn't be any problem referring to other class variables just using there names. You cannot however refer to MyBaseObject
as that isn't defined until the class definition completes.
The code you posted will work just fine (if signal
and definition
are defined), so if you are getting complaints about names not being defined that means you didn't post the exact code you used. Try posting the exact code and the exact and complete error message.
Post a Comment for "Python: Accessing Class Variables From Other Class Variables Within The Class - Possible?"