[ python-Bugs-850110 ] Out of order commands excecution?
SourceForge.net
noreply at sourceforge.net
Thu Nov 27 03:54:21 EST 2003
Bugs item #850110, was opened at 2003-11-27 08:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=850110&group_id=5470
Category: Parser/Compiler
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Nadav Horesh (nadavhoresh)
Assigned to: Nobody/Anonymous (nobody)
Summary: Out of order commands excecution?
Initial Comment:
Consider the following:
>>> import string
>>> def test1():
join = string.join
>>> def test2():
join = string.join
string = string.split
>>> test1()
>>> test2()
Traceback (most recent call last):
File "<pyshell#9>", line 1, in -toplevel-
test2()
File "<pyshell#7>", line 2, in test2
join = string.join
UnboundLocalError: local variable 'string' referenced
before assignment
>>>
How the second statement in test2 generates an error in
first one?
Nadav.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=850110&group_id=5470
More information about the Python-bugs-list
mailing list