Files
openide/python/testData/refactoring/extractmethod/OutNotEmptyStatements.after.py
Mikhail Golubev 45cc683033 PY-10829 Extracted function is inserted *after* the function where it is used
I updated test data accordingly and removed now obsolete tests about
skipping preceding comments.
2015-04-02 20:08:32 +03:00

13 lines
247 B
Python

def f():
a = 10
result = 0
result = sum_squares(a, result)
print("Sum of squares: " + result)
def sum_squares(a_new, result_new):
while a_new < 10:
result_new += a_new * a_new
a_new += 1
return result_new