Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/api_schema_graph.py |
| diff --git a/chrome/common/extensions/docs/server2/api_schema_graph.py b/chrome/common/extensions/docs/server2/api_schema_graph.py |
| index b81102a9380a318386bbb37625b79f3de7e4d803..85d70d4bbf6779be6d7e9b427e1bb8772789809c 100644 |
| --- a/chrome/common/extensions/docs/server2/api_schema_graph.py |
| +++ b/chrome/common/extensions/docs/server2/api_schema_graph.py |
| @@ -4,7 +4,6 @@ |
| import json |
| from collections import Iterable, Mapping |
| -from copy import deepcopy |
| class LookupResult(object): |
| '''Returned from APISchemaGraph.Lookup(), and relays whether or not |
| @@ -18,11 +17,17 @@ class LookupResult(object): |
| self.annotation = annotation |
| def __eq__(self, other): |
| - return self.found == other.found and self.annotation == other.annotation |
| + return self.__dict__ == other.__dict__ |
| def __ne__(self, other): |
| return not (self == other) |
| + def __repr__(self): |
| + return '%s%s' % (type(self).__name__, repr(self.__dict__)) |
|
Jeffrey Yasskin
2013/10/02 00:19:17
This is going to give something like "LookupResult
not at google - send to devlin
2013/10/02 00:40:02
Yep it's what I want.
|
| + |
| + def __str__(self): |
| + return repr(self) |
| + |
| class _GraphNode(dict): |
| '''Represents some element of an API schema, and allows extra information |