The names of lambda functions are now properly displayed in pydoc.

This commit is contained in:
Georg Brandl 2006-02-17 09:45:40 +00:00
parent 1b6726732c
commit 501dd0dd9d
2 changed files with 3 additions and 1 deletions

View file

@ -1248,7 +1248,7 @@ class TextDoc(Doc):
argspec = inspect.formatargspec(
args, varargs, varkw, defaults, formatvalue=self.formatvalue)
if realname == '<lambda>':
title = 'lambda'
title = self.bold(name) + ' lambda '
argspec = argspec[1:-1] # remove parentheses
else:
argspec = '(...)'