1. Zoom Quiet
  2. sphinx_zh

Commits

Georg Brandl  committed cb18f31

Fix pretty-printing of C++ function arguments.

  • Participants
  • Parent commits 656fd46
  • Branches default

Comments (0)

Files changed (1)

File sphinx/domains/cpp.py

View file
         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):