Storing objects required by functions.

Aahz aahz at
Tue Dec 30 16:33:59 CET 2003

In article <99dce321.0312300655.14c5a8db at>,
David M. Wilson < at> wrote:
>g = re.compile('...')
>def uses_global_yuck(x):
>    global g
>    pass

Why not just use the global?  Without the ``global`` statement, that is.
Don't like that?  How's it any different from using a class instance?
Aahz (aahz at           <*>

Weinberg's Second Law: If builders built buildings the way programmers wrote 
programs, then the first woodpecker that came along would destroy civilization.

More information about the Python-list mailing list