![]() |
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: Steven D'Aprano <steve@REMOVETHIScyber.com.au>
Date: Sat Dec 31 2005 - 01:37:38 CET
On Fri, 30 Dec 2005 15:03:54 -0800, newbie wrote:
> Hello,
Do you mean something like this?
# Module care_and_feeding
import birds
def feed_my_pet():
That is a good way of handling the problem.
> The other way I thought of is to create a separate class that consists
That's a bad way of handling it. It has all the worst aspects of using
Unless I'm badly mistaken, Guido has decided that "from module import *"
> Is there a better way?
I think the first way is fine, but of course the Devil is in the details:
-- Steven.Received on Tue Jan 3 03:27:55 2006 |