Unbound Local error? How?
Diez B. Roggisch
deets at nospam.web.de
Tue Jun 27 10:40:12 EDT 2006
Hari Sekhon wrote:
> import re
> re_regexname = re.compile('abc')
>
> .....
> ..... various function defs
> .....
>
> def func1():
> ...
> func2()
> ...
>
> def func2():
> if re_regexname.match('abc'):
> <do something>
>
> if __name__ == '__main__':
> func1()
The above clearly is not what you have. See the attached version of the
above that works. So - go check for a typo or something like that.
Diez
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.py
URL: <http://mail.python.org/pipermail/python-list/attachments/20060627/72e6a1f3/attachment.ksh>
More information about the Python-list
mailing list