Wadda ya mean it's not defined? Impossible Error?
Remco Gerlich
scarblac at pino.selwerd.nl
Tue Jun 5 04:33:35 EDT 2001
David Gilbert <dgilbert at dsl.ca> wrote in comp.lang.python:
> I'm getting what appears to be an impossible error. Here's a code
> snippet:
>
> def parseLogs(paths, custs):
>
> ipfRecord = re.compile("^([0-9]+)[ ]+([0-9]+)[
> ]+([0-9a-z]+)([+-])")
>
> last = {}
> for i in range(len(paths)): # Create start times
> ... and so on.
>
> Here's the error snippet:
>
> File "../devel/ditty/bandsaw2.py", line 37, in parseLogs
> for i in range(len(paths)): # Create start times
> UnboundLocalError: local variable 'paths' referenced before assignment
I don't get the error. You probably had a typo in the file when you tried it
(misspelled the first paths?).
--
Remco Gerlich
More information about the Python-list
mailing list