> By "per-class-instance variables", you are talking
> about instance attributes? I.e. "self.use_gmt_times"?
> I don't see much difference between global variables
> and instance attributes.
using global variable in modules makes the module not Thread-safe
Using a instance attribute allows more
On 16 Dic, 18:01, ianaré wrote:
> For anything more complicated than a simple script, I find it easier
> to use some sort of config object. This could be a simple dictionnary
> type class, where the values can be set/retrieved by the other classes
> directly, or a more elaborate class including fu
For anything more complicated than a simple script, I find it easier
to use some sort of config object. This could be a simple dictionnary
type class, where the values can be set/retrieved by the other classes
directly, or a more elaborate class including functions to set/
retrieve the variables. T
On Dec 16, 4:45 am, "Giampaolo Rodola'" wrote:
> Hi,
> in a module of mine (ftpserver.py) I'd want to add a (boolean) global
> variable named "use_gmt_times" to decide whether the server has to
> return times in GMT or localtime but I'm not sure if it is a good idea
> because of the "ethical" doub
On 16 Dic, 07:23, Michele Simionato
wrote:
> On Dec 16, 3:45 am, "Giampaolo Rodola'" wrote:
>
> > Hi,
> > in a module of mine (ftpserver.py) I'd want to add a (boolean) global
> > variable named "use_gmt_times" to decide whether the server has to
> > return times in GMT or localtime but I'm not s
En Tue, 16 Dec 2008 00:45:05 -0200, Giampaolo Rodola'
escribió:
Another doubt is the naming convention. PEP-8 states that global
variables should use the lower_case_naming_convention but I've seen a
lot of library module using the UPPER_CASE_NAMING_CONVENTION. What am
I supposed to do about it?
Giampaolo Rodola' a écrit :
Hi,
in a module of mine (ftpserver.py) I'd want to add a (boolean) global
variable named "use_gmt_times" to decide whether the server has to
return times in GMT or localtime but I'm not sure if it is a good idea
because of the "ethical" doubts I'm gonna write below.
I
On Dec 16, 3:45 am, "Giampaolo Rodola'" wrote:
> Hi,
> in a module of mine (ftpserver.py) I'd want to add a (boolean) global
> variable named "use_gmt_times" to decide whether the server has to
> return times in GMT or localtime but I'm not sure if it is a good idea
> because of the "ethical" doub
On Dec 15, 11:00 pm, ru...@yahoo.com wrote:
> #my_module
> class Config: pass
> config = Config()
>
> def func1(state):
> config.A = 1
> def func2(state)
> config.A = 2
> def func3(state)
> print config.A
That of course should have been:
def func1(config):
config.A = 1
def func2(c
On Dec 15, 7:45 pm, "Giampaolo Rodola'" wrote:
> in a module of mine (ftpserver.py) I'd want to add a (boolean) global
> variable named "use_gmt_times" to decide whether the server has to
> return times in GMT or localtime but I'm not sure if it is a good idea
> because of the "ethical" doubts I'm
On Tue, Dec 16, 2008 at 12:45 PM, Giampaolo Rodola' wrote:
> Hi,
> in a module of mine (ftpserver.py) I'd want to add a (boolean) global
> variable named "use_gmt_times" to decide whether the server has to
> return times in GMT or localtime but I'm not sure if it is a good idea
> because of the "e
Hi,
in a module of mine (ftpserver.py) I'd want to add a (boolean) global
variable named "use_gmt_times" to decide whether the server has to
return times in GMT or localtime but I'm not sure if it is a good idea
because of the "ethical" doubts I'm gonna write below.
In first place I've never liked
12 matches
Mail list logo