[Python-ideas] new pickle semantics/API
Collin Winter
collinw at gmail.com
Thu Jan 25 22:21:54 CET 2007
On 1/25/07, tomer filiba <tomerfiliba at gmail.com> wrote:
> for example:
> * int - return self
> * float - string in the format "[+-]X.YYYe[+-]EEE"
> * complex - two floats
> * tuple - tuple of its simplified elements
> * list - tuple of its simplified elements
> * dict - a tuple of (key, value) tuples
> * set - a tuple of its items
> * file - raises TypeError("can't be simplified")
[snip]
> the default implementation of __getstate__, in object.__getstate__,
> will simply return self.__dict__ and any self.__slots__
How will e.g. classes be simplified? Can I simplify a dictionary with
function objects for values?
Collin Winter
More information about the Python-ideas
mailing list