RE: Scope problem with nested functions.

2005-10-13 Thread AddisonN
Thanks Fredrik, that's fixed it. Apologies for the lazy typing - should have cut and pasted the whole thing. -Original Message- From: Fredrik Lundh [mailto:[EMAIL PROTECTED] Sent: 13 October 2005 08:55 To: python-list@python.org Subject: Re: Scope problem with nested functions. &l

Re: Scope problem with nested functions.

2005-10-13 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote > I'm having trouble resolving a scope problem. I have a module, > called from another script, with this structure: the code you posted gives a syntax error. if I fix that, and add some boilerplate to call getCcyMappings from inside the parseFile function, I get: Trace

Scope problem with nested functions.

2005-10-12 Thread AddisonN
I'm having trouble resolving a scope problem. I have a module, called from another script, with this structure:   def parseFile(file, myLocation, defaults): # initialisation. ccyMappings = {}   def getCcyMappings()   global ccyMappings   # read values into