globals accros modules

Steve Holden steve at
Fri Jan 12 00:13:02 CET 2007

stef wrote:
>> Change a=1 to amodule.a=1
>> If you find yourself doing tricks with the module globals, think about 
>> redesigning your application.
> Of course I completely agree with you.
> But ...
> if you're moving from MatLab to Python,
> and want to show your collegaes,
> with how little effort they can reuse all their existing MatLab routines 
> in Python,
> then the global issue is a real pain !!
> You can explain your collegaes, that
> - the startindex of arrays changes from 1 to 0
> - slices are upto, instead of including the final border
> - indention is thé key
> And tell them about all beautiful things in Python,
> but tell them that they are going to loose all their globals ???
Yup. If they don't tell us how to write programs we won't tell them how 
to cure illness. Sounds like a deal to me ...

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Blog of Note:

More information about the Python-list mailing list