summaryrefslogtreecommitdiff
path: root/sphinx/domains/cpp.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2011-01-06 13:07:07 +0100
committerGeorg Brandl <georg@python.org>2011-01-06 13:07:07 +0100
commit556925036c9f287a871ed972fcc0630523df8539 (patch)
tree5b6a4fbb10eb689c11914ffb03dd41dd7b5c63e3 /sphinx/domains/cpp.py
parenta53ec83ec754525cd0d3d8015a0290c12b44bf9c (diff)
parentcd153a36e9edd5854fe9c6ff4499d710278b9bfa (diff)
downloadsphinx-556925036c9f287a871ed972fcc0630523df8539.tar.gz
merge with 1.0
Diffstat (limited to 'sphinx/domains/cpp.py')
-rw-r--r--sphinx/domains/cpp.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py
index 04fa100d..e712e01e 100644
--- a/sphinx/domains/cpp.py
+++ b/sphinx/domains/cpp.py
@@ -109,7 +109,7 @@ class DefinitionError(Exception):
return self.description
def __str__(self):
- return unicode(self.encode('utf-8'))
+ return unicode(self).encode('utf-8')
class DefExpr(object):
@@ -131,17 +131,21 @@ class DefExpr(object):
def __ne__(self, other):
return not self.__eq__(other)
+ __hash__ = None
+
def clone(self):
- """Close a definition expression node"""
+ """Clone a definition expression node."""
return deepcopy(self)
def get_id(self):
- """Returns the id for the node"""
+ """Return the id for the node."""
return u''
def get_name(self):
- """Returns the name. Returns either `None` or a node with
- a name you might call :meth:`split_owner` on.
+ """Return the name.
+
+ Returns either `None` or a node with a name you might call
+ :meth:`split_owner` on.
"""
return None
@@ -154,7 +158,7 @@ class DefExpr(object):
return None, self
def prefix(self, prefix):
- """Prefixes a name node (a node returned by :meth:`get_name`)."""
+ """Prefix a name node (a node returned by :meth:`get_name`)."""
raise NotImplementedError()
def __str__(self):
@@ -977,8 +981,9 @@ class CPPFunctionObject(CPPObject):
class CPPCurrentNamespace(Directive):
- """This directive is just to tell Sphinx that we're documenting
- stuff in namespace foo.
+ """
+ This directive is just to tell Sphinx that we're documenting stuff in
+ namespace foo.
"""
has_content = False