On Sun, 01 Jan 2006 06:48:48 -0800, Kay Schluehr wrote:
>> Agree about from module import * being bad, but it is still generally poor
>> practice for the same reason using global variables is generally poor
>> practice.
>
> No, I don't think so. The general wisdom is that global variables are
> b
Steven D'Aprano wrote:
> On Fri, 30 Dec 2005 20:00:51 -0500, Mike Meyer wrote:
>
>
> >> The other way I thought of is to create a separate class that consists
> >> of the variables and to use the
> >>
> >> from import *
> >>
> >> in all of the files (namespaces) where it is needed.
> >
> > Except
On Sat, 31 Dec 2005 21:21:29 +, Dennis Lee Bieber wrote:
> On Sat, 31 Dec 2005 11:37:38 +1100, Steven D'Aprano
> <[EMAIL PROTECTED]> declaimed the following in
> comp.lang.python:
>
>>
>> Do you mean something like this?
>>
>> # Module care_and_feeding
>>
>> import birds
>> import foods
>>
On Fri, 30 Dec 2005 20:00:51 -0500, Mike Meyer wrote:
>> The other way I thought of is to create a separate class that consists
>> of the variables and to use the
>>
>> from import *
>>
>> in all of the files (namespaces) where it is needed.
>
> Except for one detail, this is a Pythonesque meth
Gary Herron said unto the world upon 30/12/05 08:03 PM:
> newbie wrote:
>
>
>>Hello,
>>
>>I have questions about global variables in OOP (in general) and Python
>>(in specific). I understand (I think) that global variables are
>>generally not a good idea. However, if there are variables that nee
newbie wrote:
>Hello,
>
>I have questions about global variables in OOP (in general) and Python
>(in specific). I understand (I think) that global variables are
>generally not a good idea. However, if there are variables that need to
>be accessed by a number of classes that exists in separate nam
"newbie" <[EMAIL PROTECTED]> writes:
> So far, I have approached the problem by making the variables
> attributes of one class and passing instances of the class as variables
> to the other class' methods.
That's the standard way to do it in OO languages.
> The other way I thought of is to create
On Fri, 30 Dec 2005 15:03:54 -0800, newbie wrote:
> Hello,
>
> I have questions about global variables in OOP (in general) and Python
> (in specific). I understand (I think) that global variables are
> generally not a good idea. However, if there are variables that need to
> be accessed by a num
Hello,
I have questions about global variables in OOP (in general) and Python
(in specific). I understand (I think) that global variables are
generally not a good idea. However, if there are variables that need to
be accessed by a number of classes that exists in separate namespaces
(files), what