]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Bug #1432260: better handle lambda functions' names in pydoc
authorGeorg Brandl <georg@python.org>
Fri, 17 Feb 2006 09:47:47 +0000 (09:47 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 17 Feb 2006 09:47:47 +0000 (09:47 +0000)
Lib/pydoc.py
Misc/NEWS

index ceabb14446538df7b82d510cd83e9dad2cad0043..056982699a6d2198d2f2b53bad2e041a940f9471 100755 (executable)
@@ -1242,7 +1242,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 = '(...)'
index 5a248613d627fd4f2ce914e289c52892c799a137..af3c3ad0e08b5f3143b091238580a9c499d5bec7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,9 @@ Extension Modules
 Library
 -------
 
+- Bug #1432260: The names of lambda functions are now properly displayed 
+  in pydoc.
+
 - Bug #1371247: Update Windows locale identifiers in locale.py.
 
 - Bug #1394565: SimpleHTTPServer now doesn't choke on query parameters