[issue17941] namedtuple should support fully qualified name for more portable pickling

Josh Rosenberg report at bugs.python.org
Sat Jun 14 04:02:46 CEST 2014


Josh Rosenberg added the comment:

I was already thinking of the same solution Christian.Tismer proposed before I reached his post. namedtuples seem cleaner if they naturally act as singletons, so (potentially whether or not pickling is involved) declaring a namedtuple with the same name and fields twice returns the same class. Removes the need to deal with module qualified names, and if pickle can be made to support it, the namedtuple class itself could be pickled uniquely in such a way that it could be recreated by someone else who didn't even have a local definition of the namedtuple, the module that defines it, etc.

----------
nosy: +josh.rosenberg

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17941>
_______________________________________


More information about the Python-bugs-list mailing list