[New-bugs-announce] [issue7747] Function variable wrongly reported unassigned
Adrian May
report at bugs.python.org
Thu Jan 21 08:32:39 CET 2010
New submission from Adrian May <adrian.alexander.may at gmail.com>:
Hi folks,
The attached program says:
$ ./bug.py
a
None
b
Traceback (most recent call last):
File "./bug.py", line 49, in <module>
print number(s)
File "./bug.py", line 34, in foo
while eat != None:
UnboundLocalError: local variable 'eat' referenced before assignment
but I reckon it is assigned. (I haven't tried it on a newer python because the junk I want to use with python says it only works with 2.5.2.)
Cheers, Adrian.
----------
components: Interpreter Core
files: bug.py
messages: 98101
nosy: adrianmay
severity: normal
status: open
title: Function variable wrongly reported unassigned
type: compile error
versions: Python 2.5
Added file: http://bugs.python.org/file15963/bug.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7747>
_______________________________________
More information about the New-bugs-announce
mailing list