[Tutor] Working with Python Objects
Dinesh B Vadhia
dineshbvadhia at hotmail.com
Fri Mar 14 18:37:13 CET 2008
I've avoided it as long as possible but I've reached a stage where I have to start using Python objects! The primary reason is that the web framework uses objects and the second is to eliminate a few globals. Here is example pseudo code followed by the question (one of many I suspect!):
constantA = 9
a = <do something else>
variableB = "quick brown fox"
b = <do something more>
c = b * a # the 'a' from def OneOfA in class A
1) how do I access the 'a' from function (method) OneOfA in class A so that it can be used by functions (methods) in class B?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor