[issue26605] Feature request: string method `to_file`
nickeubank
report at bugs.python.org
Mon Mar 21 20:18:53 EDT 2016
nickeubank added the comment:
Seems like existence of a method in the stdlib (or at least in the pathlib part of the stdlib) suggests issues with text encoding can be overcome.
IMHO I would suggest most people have no idea about that method (I've been doing python for years and this has always been a personal frustration, and I've asked several others for better options and no one had one to offer), and it seems like it would make much more sense as a string method. If someone has a string they want to save to disk, I can't imagine anyone looking in the Path library.
I respect the desire to avoid bloat -- the context manager or open/close idiom has just felt unnecessarily complicated (dare I say unpythonic?) for a common task.
Also, I think it's one that data scientists use a lot when they generate outputs to pull into LaTeX documents.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26605>
_______________________________________
More information about the Python-bugs-list
mailing list