fixed PY-6482 Move statement: ineffective move down to else statement in try/except/else

This commit is contained in:
Ekaterina Tuzova
2012-05-02 15:42:24 +04:00
parent 936c7f4d0a
commit dac294d16f
5 changed files with 30 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
try:
print(zoo(1).foo(2))
except:
print<caret>(zoo(0).foo(2)) # <- move statement up here
else:
a = 1
@@ -0,0 +1,8 @@
try:
print(zoo(1).foo(2))
except:
pass
else:
print<caret>(zoo(0).foo(2)) # <- move statement up here
a = 1
@@ -0,0 +1,8 @@
try:
print(zoo(1).foo(2))
print<caret>(zoo(0).foo(2)) # <- move statement up here
except:
pass
else:
a = 1