![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.python archiveRe: Global Variables in OOP and Python
From: Mike Meyer <mwm@mired.org>
Date: Sat Dec 31 2005 - 02:00:51 CET
"newbie" <solaris_1234@yahoo.com> writes:
That's the standard way to do it in OO languages.
> The other way I thought of is to create a separate class that consists
Except for one detail, this is a Pythonesque method. The detail is
1) Blindly adding everything in a module to your namespace is liable
2) It makes finding where a variable came from harder. Having to
A better way to do this is to give your module a name that denotes
> Are the two ideas presented above acceptable? If so, is one better than
With the one change, they are. From an OO point of view, they're
<mike
-- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.Received on Tue Jan 3 03:27:58 2006 |