diff options
| author | Georg Brandl <georg@python.org> | 2011-01-04 00:35:27 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2011-01-04 00:35:27 +0100 |
| commit | 902f69759d2844def54b6182d875da737e1f8f3a (patch) | |
| tree | eed02f129e674a183307a35cd383b9c6f369b6bf /sphinx/domains/cpp.py | |
| parent | 77a016a404d48cc44026d0bec691e967e92e58bf (diff) | |
| parent | 5c8a206dd399745c289d37ff4d8408c1834ea24b (diff) | |
| download | sphinx-902f69759d2844def54b6182d875da737e1f8f3a.tar.gz | |
merge with 1.0
Diffstat (limited to 'sphinx/domains/cpp.py')
| -rw-r--r-- | sphinx/domains/cpp.py | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 75769ab7..d1174513 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,30 +131,34 @@ 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 def split_owner(self): - """Nodes returned by :meth:`get_name` can split off their - owning parent. This function returns the owner and the - name as a tuple of two items. If a node does not support - it, :exc:`NotImplementedError` is raised. + """Nodes returned by :meth:`get_name` can split off their owning parent. + + This function returns the owner and the name as a tuple of two items. + If a node does not support it, :exc:`NotImplementedError` is raised. """ raise NotImplementedError() 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): @@ -979,8 +983,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 |
