STINNER Victor added the comment: It's easy to implement such function in a module and upload such module to PyPI (ex: "to_file" module :-)).
It's not easy to guess user expectations on such function: text encoding, buffering, etc. Adding a method to the builtin str type which writes into a file is a no-no. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26605> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com