[Patches] [ python-Patches-1516327 ] Module uuid: reduce pickle footprint

SourceForge.net noreply at sourceforge.net
Mon Jul 3 15:32:46 CEST 2006


Patches item #1516327, was opened at 2006-07-03 13:22
Message generated for change (Settings changed) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1516327&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Modules
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Michael Amrhein (mamrhein)
>Assigned to: Ka-Ping Yee (ping)
Summary: Module uuid: reduce pickle footprint

Initial Comment:
In order to reduce the pickle footprint of UUIDs I
would add a __reduce__ method to class UUID like

    def __reduce__(self):
        return (uuid, (self.int,))

together with a helper function (at module level) like

def uuid(i):
    return UUID(int=i)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1516327&group_id=5470


More information about the Patches mailing list