On Fri, 7 Feb 2020 13:03:52 -0500
Todd <[email protected]> wrote:
> Currently with pickle you have to "open" the file separately from the
> pickle operation, generally using a "with" clause, then provide the file
> object to one of the pickle.dump or pickle.load.  This adds quite a bit of
> boilerplate for simply saving a file

What you call "quite a bit of boilerplate" is just an additional line
of code.  If you are frequently being bothered by this (I'm curious
what the context is?), it's easy to add the desired helper function to
your own library.

In general, I don't think adding tons of trivial convenience helpers
is good API design, it ends up making the API more difficult to
discover and digest.

Regards

Antoine.

_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/4N2O3UMNV2AUXQ5TSZ4JSP7DUIRJDE3S/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to