The author seems to be implying that the variant with (first, *rest) as the input arguments wouldn't work with files but after experimenting with it, I found that it does work.
# Code I tried:
def mysum(first, *rest):
return first if not rest else first + mysum(*rest)
first = open("script1.py
rest = 
<_io.TextIOWrapper name='script1.py' mode='r' encoding='cp1252'>
The author wants a function that takes an iterable (e.g. a list, tuple, etc) as input and returns the sum, e.g. like this:
When you write
This is roughly equivalent to
f = open("script1.py").readlines() mysum(f, f, ..., f[n])
Note that here your code does not take an interable as input, instead it takes several separate arguments which is not what the author wanted.