![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: Having Trouble with Scoping Rules
From: Charles Krug <cdkrug@aol.com>
Date: Tue Jan 31 2006 - 06:12:03 CET
On 2006-01-31, Farshid Lashkari <flashkNO@SPAMgmail.com> wrote:
Not really. If I'd understood the docs, I wouldn't need to ask here.
Okay, that works in the module where I define the function. But if I
# expensive Object User
print Expensive.ExpensiveObject()
I get the same exception. That approach most likely isn't going to work
Okay THIS seems to be working for me:
# expensive Object Module
_expensiveObject = None
return retval
if __name__ == '__main__':
Which gives me:
>>> import Expensive
I'll try it with my actual class instance to verify. Anyone see
Thanx
|