
Jan. 25, 2007
9:21 p.m.
On 1/25/07, tomer filiba <tomerfiliba@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