[Chicago] Using globals across files
Chris Cope
chris at copester.com
Tue Mar 28 23:18:39 CEST 2006
Yes this is a bad programming practice, that I avoid, and have avoided
for a long time. But for this example, where I want a lot of files to
all increment the same counters, it seemed like a good idea at the time. ;)
Whatever works, right?
Chris
Martin Maney wrote:
> On Mon, Mar 27, 2006 at 10:39:49AM -0600, Chris Cope wrote:
>
>>better approach anyway. In 4 years of programming with python, I've
>>never used globals before, and had no idea seamlessly sharing them
>>between files, like with an external in C, wasn't feasible. :)
>
>
> While Python isn't a bondage & discipline kind of langauge, it doesn't
> waste much effort making bad ideas easy, either. <wink>
>
> This may be one of the real exceptions, but my experience has been that
> sharing state though globals is well up on the list of things that will
> eventually circle around and bite you in the ass. Just sayin'.
>
More information about the Chicago
mailing list