Frankly, I’ve often wanted this for other things that share a similar API, JSON comes to mind.
Loading from/saving to a file is a pretty common thing— nice to make it easy. And JSON at least has *s versions for strings, so no confusion there. But it’s been this way a LONG time, and with a general trend of Python becoming more of a systems that scripting language, I don’t see it changing. -CHB PS: you don’t need the context manager — at least in cPython — you can put the open call right in the call to load() -- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/APUNKJZXVAMOGZKNS64Y7366YPCIUAI3/ Code of Conduct: http://python.org/psf/codeofconduct/