def __init__(self, obj, keys=[], hook=None):
self.keys = keys<EOL>self.obj = copy.copy(obj)<EOL>self.hook = can(hook)<EOL>for key in keys:<EOL><INDENT>setattr(self.obj, key, can(getattr(obj, key)))<EOL><DEDENT>self.buffers = []<EOL>
Can an object for safe pickling.

        Parameters
        ==========

        obj:
            The object to be canned
        keys: list (optional)
            list of attribute names that will be explicitly canned / uncanned
        hook: callable (optional)
            An optional extra callable,
            which can do additional processing of the uncanned object.

        Large data may be offloaded into the buffers list,
        used for zero-copy transfers.