Type to uniquely identify a shared object
| 61 | # |
| 62 | |
| 63 | class Token(object): |
| 64 | ''' |
| 65 | Type to uniquely identify a shared object |
| 66 | ''' |
| 67 | __slots__ = ('typeid', 'address', 'id') |
| 68 | |
| 69 | def __init__(self, typeid, address, id): |
| 70 | (self.typeid, self.address, self.id) = (typeid, address, id) |
| 71 | |
| 72 | def __getstate__(self): |
| 73 | return (self.typeid, self.address, self.id) |
| 74 | |
| 75 | def __setstate__(self, state): |
| 76 | (self.typeid, self.address, self.id) = state |
| 77 | |
| 78 | def __repr__(self): |
| 79 | return '%s(typeid=%r, address=%r, id=%r)' % \ |
| 80 | (self.__class__.__name__, self.typeid, self.address, self.id) |
| 81 | |
| 82 | # |
| 83 | # Function for communication with a manager's server process |
no outgoing calls
no test coverage detected
searching dependent graphs…