This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients alexandre.vassalotti, gvanrossum, pitrou, rhettinger, serhiy.storchaka, stutzbach
Date 2016-06-04.20:55:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465073720.05.0.783126658246.issue23401@psf.upfronthosting.co.za>
In-reply-to
Content
Because I can! I just want to ensure that all basic types (for which it makes sense) are correctly and portable pickleable, especially collections and related classes. Note that currently Mapping views are pickleable (as most pure Python classes), but pickle exposes implementation detail (the _mapping attribute). For example pickled keys view of Python implementation of OrderedDict is not fully compatible with C implementation. I want to provide implementation agnostic and more efficient pickling.

>>> keys = collections.abc.KeysView({1: 2, 3: 4})
>>> keys.__reduce_ex__(3)
(<function __newobj__ at 0xb6f64bb4>, (<class 'collections.abc.KeysView'>,), (None, {'_mapping': {1: 2, 3: 4}}), None, None)

There are many ways to do this (msg235477, msg235493). I hesitate with choosing,
History
Date User Action Args
2016-06-04 20:55:20serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, rhettinger, pitrou, alexandre.vassalotti, stutzbach
2016-06-04 20:55:20serhiy.storchakasetmessageid: <1465073720.05.0.783126658246.issue23401@psf.upfronthosting.co.za>
2016-06-04 20:55:20serhiy.storchakalinkissue23401 messages
2016-06-04 20:55:19serhiy.storchakacreate