Fix pretty-printing of C++ function arguments.

This commit is contained in:
Georg Brandl 2011-01-04 00:34:47 +01:00
parent 5072e74a46
commit eecd8bff03

View File

@ -322,9 +322,8 @@ class ArgumentDefExpr(DefExpr):
return self.type.get_id() return self.type.get_id()
def __unicode__(self): def __unicode__(self):
return (self.type is not None and u'%s %s' % (self.type, self.name) return (u'%s %s' % (self.type or u'', self.name or u'')).strip() + \
or unicode(self.name)) + (self.default is not None and (self.default is not None and u'=%s' % self.default or u'')
u'=%s' % self.default or u'')
class NamedDefExpr(DefExpr): class NamedDefExpr(DefExpr):