3 ms·
I suspect it’s also to do with Python’s history as a scripting language. Because of Perl’s obvious strengths in this area, any scripting language pretty much ha
by signal11 6y ago
I suspect it’s also to do with Python’s history as a scripting language. Because of Perl’s obvious strengths in this area, any scripting language pretty much has to make it very easy to work with text files. Ruby does something similar for instance.
Even languages like Java now recognise the need to provide convenient access to text files as part of the standard API, with Files.readAllLines() in 7, Files.lines() in 8, and Files.readString() in 11.
- BiteCode_dev 6y agoYou can make it easy to deal with text file without lying to your API users. open("foo", mode="t") could become open("foo").as_text(). Besides, Python has pathlib now, which allows you to do Path("foo").read_text() for quick and dirty text handling already.