3 ms·
`data = sys.stdin.readlines()` in their Python script. Is it common to not check return values of functions in Python land? I might be too disciplined coming fr
by _RPM 11y ago
`data = sys.stdin.readlines()` in their Python script. Is it common to not check return values of functions in Python land? I might be too disciplined coming from a C background, but what if getting the data fails?
- detaro 11y agoThen the function throws an exception and the program terminates, since there isn't anything useful it can do about the situation. What would you suggest it to do if it can't read from stdin?