equal
deleted
inserted
replaced
266 self._is_saved = True |
266 self._is_saved = True |
267 |
267 |
268 def __repr__(self): |
268 def __repr__(self): |
269 return '<Entity %s %s %s at %s>' % ( |
269 return '<Entity %s %s %s at %s>' % ( |
270 self.e_schema, self.eid, self.keys(), id(self)) |
270 self.e_schema, self.eid, self.keys(), id(self)) |
|
271 |
|
272 def __json_encode__(self): |
|
273 """custom json dumps hook to dump the entity's eid |
|
274 which is not part of dict structure itself |
|
275 """ |
|
276 dumpable = dict(self) |
|
277 dumpable['eid'] = self.eid |
|
278 return dumpable |
271 |
279 |
272 def __nonzero__(self): |
280 def __nonzero__(self): |
273 return True |
281 return True |
274 |
282 |
275 def __hash__(self): |
283 def __hash__(self): |