[issue14118] _pickle.c structure cleanup
Merlijn van Deen
report at bugs.python.org
Sat Feb 25 01:10:06 CET 2012
Merlijn van Deen <valhallasw at gmail.com> added the comment:
That makes sense. The goal was not so much cleaning up the module per se; rather, it was a result of trying to understand the general structure of _pickler.c specifically.
However, is there an intermediate level of 'modularization' you would propose? The idea is of course not to have 30 files open to make a small change, but rather have one or two reasonably small files open. My current approach was fine-grained on purpose - it's not that much work to recombine files.
I think it makes sense to split the PicklerObject into several parts:
* the Pickler object (initialization/type/etc, maybe functions split off)
* the actualy pickler implementation (dump/save/save_*) (but maybe in less files - see below)
* the PicklerMemoProxy
for the picker implementation - specifically the picklers directory - my approach was to have a 'mirrored' directory for PicklerObject and UnPicklerObject: the methods to pickle and unpickle will be in the same files in the two directories (i.e. picklers/unicode.c will pickle str, unpicklers/unicode.c will unpickle them).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14118>
_______________________________________
More information about the Python-bugs-list
mailing list