Files
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

14 lines
329 B
Python

def foo():
for arg in sys.argv[1:]:
try:
f = open(arg, 'r')
except IOError:
print('cannot open', arg)
else:
baz(f)
#anything else you need
def baz(f_new):
length = len(f_new.readlines()) # <---extract something from here
print("hi from else")