diff options
| author | Georg Brandl <georg@python.org> | 2011-01-04 00:34:47 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2011-01-04 00:34:47 +0100 |
| commit | 77a016a404d48cc44026d0bec691e967e92e58bf (patch) | |
| tree | 4e3b46ace88de6b0b42fe3c63f305e295528d012 | |
| parent | 7b663c5e459385ee456c30ac0ca194405b979e23 (diff) | |
| download | sphinx-77a016a404d48cc44026d0bec691e967e92e58bf.tar.gz | |
Fix pretty-printing of C++ function arguments.
| -rw-r--r-- | sphinx/domains/cpp.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 5ea16b5f..75769ab7 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -322,9 +322,8 @@ class ArgumentDefExpr(DefExpr): return self.type.get_id() def __unicode__(self): - return (self.type is not None and u'%s %s' % (self.type, self.name) - or unicode(self.name)) + (self.default is not None and - u'=%s' % self.default or u'') + return (u'%s %s' % (self.type or u'', self.name or u'')).strip() + \ + (self.default is not None and u'=%s' % self.default or u'') class NamedDefExpr(DefExpr): |
