Hacker News new | ask | show | jobs
by joshvm 2648 days ago
Lots of public APIs support this behaviour, it's convenient for users. For example numpy.fromfile will accept a file object or a string.