<s> from pickle import * <EOL> from pickle import __doc__ , __version__ , format_version , compatible_formats <EOL> BadPickleGet = KeyError <EOL> UnpickleableError = PicklingError <EOL> from pickle import StringIO <EOL> PythonPickler = Pickler <EOL> class Pickler ( PythonPickler ) : <EOL> def __init__ ( self , * args , ** kw ) : <EOL> self . __f = None <EOL> if len ( args ) == <NUM_LIT:1> and isinstance ( args [ <NUM_LIT:0> ] , int ) : <EOL> self . __f = StringIO ( ) <EOL> PythonPickler . __init__ ( self , self . __f , args [ <NUM_LIT:0> ] , ** kw ) <EOL> else : <EOL> PythonPickler . __init__ ( self , * args , ** kw ) <EOL> def memoize ( self , obj ) : <EOL> self . memo [ None ] = None <EOL> return PythonPickler . memoize ( self , obj ) <EOL> def getvalue ( self ) : <EOL> return self . __f and self . __f . getvalue ( ) <EOL> def dump ( obj , file , protocol = None ) : <EOL> Pickler ( file , protocol ) . dump ( obj ) <EOL> def dumps ( obj , protocol = None ) : <EOL> file = StringIO ( ) <EOL> Pickler ( file , protocol ) . dump ( obj ) <EOL> return file . getvalue ( ) </s>
