
I believe Sergie already suggested pickle and marshall, and I guess we can add plistlib to those. Personally, I'm not so sure it should be added to all these. I see why the same API was used for all of them, but they really are fairly different beasts. So if they have a function with the same purpose, it should have the same name, but that doesn't mean that all these modules need to have all the functions. On the other hand, the fact that we might be adding two new functions to four different modules is, in my mind, andn argument for overloading the existing dump() / load() instead. a lot less API churn. -CHB On Wed, Sep 16, 2020 at 5:10 PM Chris Angelico <rosuav@gmail.com> wrote:
On Thu, Sep 17, 2020 at 9:53 AM <lammenspaolo@gmail.com> wrote:
Maybe unrelated, but the same goes for `pickle.load` and `pickle.dump`.
For consistencies, any changes made to `json.load` and `json.dump` (e.g. adding `json.loadf` and `json.dumpf` or accepting a path like as argument) should be also applied equivalently to `pickle.load` and `pickle.dump`.
Off the top of my head, I can't think of any more places in the standard
library with the same parallel structure.
marshal is the other one in that set, and a quick 'git grep' shows that plistlib also has that API. The xmlrpc.client module also has dumps/loads, but not dump/load.
ChrisA _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@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/AWJNAL... Code of Conduct: http://python.org/psf/codeofconduct/
-- Christopher Barker, PhD Python Language Consulting - Teaching - Scientific Software Development - Desktop GUI and Web Development - wxPython, numpy, scipy, Cython