mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 19:28:58 +07:00
I updated test data accordingly and removed now obsolete tests about skipping preceding comments.
14 lines
329 B
Python
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") |