[Python-ideas] `to_file()` method for strings

Andrew Barnert abarnert at yahoo.com
Thu Mar 24 17:43:58 EDT 2016


I did a quick survey of other languages, cross-language  frameworks, etc. to see what they offer, and I was surprised.

To look at my quick survey (or correct me! I wasn't super-careful here, and may easily have taken misleading StackOverflow posts or the like at face value): https://goo.gl/9bJcAf

Anyway, the original proposal in this thread is very close to Cocoa, but that turns out to be pretty uncommon. Most frameworks use free functions, not methods on either string or path objects. Most don't offer an option for atomic writes or exclusive locks--although some do them whether you want it or not. Most have an option for appending. All but one either let you specify the encoding or don't do test. Almost none of those were what I expected.



More information about the Python-ideas mailing list