New submission from Merlijn van Deen <valhall...@gmail.com>: While working on #6784, I've looked at _pickle.c and found it quite... daunting: 6500 lines and 185kB. I have been working on a bit of cleanup, and I'd like some comments on this.
I'm working on adapting _pickle.c into the following structure: _pickle.c takes care of the module initialization _pickle/*.c are helper files for this (global functions/definitions) _pickle/PicklerObject contains all files that relate to the Pickler class - initialization, all functions, etc, and _pickle/PicklerObject/picklers/*.c contains all pickling functions, split out into groups (corresponding to pickletools.StackObjects) This should end in a tree where every .c module lists the relevant dependencies (and as such should be compilable on itself). Currently, I'm at the point where PicklerObject roughly has the structure I want (although not every file is compilable on itself yet). As such, I feel this is the right moment to ask if it would be seen as an useful improvement in trunk, and to see if anyone has suggestions for improvements. hg repos: https://bitbucket.org/valhallasw/cpython/src/0810ffadffa3/Modules/_pickle/PicklerObject (_pickle_clean branch) ---------- components: Extension Modules hgrepos: 114 messages: 154165 nosy: valhallasw priority: normal severity: normal status: open title: _pickle.c structure cleanup type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14118> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com