diff options
| author | Georg Brandl <georg@python.org> | 2013-03-29 12:34:57 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2013-03-29 12:34:57 +0100 |
| commit | ec38679f4f86e6da51f239afd2327f81ef7ba075 (patch) | |
| tree | 40d0fada6d4f850f13ef7828d61427dee7e518c6 /sphinx | |
| parent | 7fc1f93c5178a7982fc8def6c9c7632a61d4d97a (diff) | |
| download | sphinx-ec38679f4f86e6da51f239afd2327f81ef7ba075.tar.gz | |
nodes utils: remove monkey-patch that is in docutils >=0.7
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/util/nodes.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/sphinx/util/nodes.py b/sphinx/util/nodes.py index 640ef495..62ad5d77 100644 --- a/sphinx/util/nodes.py +++ b/sphinx/util/nodes.py @@ -216,18 +216,6 @@ def set_role_source_info(inliner, lineno, node): # docutils 0.9+ node.source, node.line = inliner.reporter.get_source_and_line(lineno) -# monkey-patch Node.__contains__ to get consistent "in" operator behavior -# across docutils versions - -def _new_contains(self, key): - # support both membership test for children and attributes - # (has_key is translated to "in" by 2to3) - if isinstance(key, basestring): - return key in self.attributes - return key in self.children - -nodes.Node.__contains__ = _new_contains - # monkey-patch Element.copy to copy the rawsource def _new_copy(self): |
