Show More
@@ -50,6 +50,22 else: | |||
|
50 | 50 | |
|
51 | 51 | class CannedObject(object): |
|
52 | 52 | def __init__(self, obj, keys=[], hook=None): |
|
53 | """can an object for safe pickling | |
|
54 | ||
|
55 | Parameters | |
|
56 | ========== | |
|
57 | ||
|
58 | obj: | |
|
59 | The object to be canned | |
|
60 | keys: list (optional) | |
|
61 | list of attribute names that will be explicitly canned / uncanned | |
|
62 | hook: callable (optional) | |
|
63 | An optional extra callable, | |
|
64 | which can do additional processing of the uncanned object. | |
|
65 | ||
|
66 | large data may be offloaded into the buffers list, | |
|
67 | used for zero-copy transfers. | |
|
68 | """ | |
|
53 | 69 | self.keys = keys |
|
54 | 70 | self.obj = copy.copy(obj) |
|
55 | 71 | self.hook = can(hook) |
General Comments 0
You need to be logged in to leave comments.
Login now