[pypy-svn] r77363 - pypy/branch/fast-forward/pypy/module/__builtin__

agaynor at codespeak.net agaynor at codespeak.net
Sat Sep 25 04:45:48 CEST 2010


Author: agaynor
Date: Sat Sep 25 04:45:44 2010
New Revision: 77363

Modified:
   pypy/branch/fast-forward/pypy/module/__builtin__/functional.py
Log:
Fix 2 tests in functools that fail because our docstring for max is different from CPython's.

Modified: pypy/branch/fast-forward/pypy/module/__builtin__/functional.py
==============================================================================
--- pypy/branch/fast-forward/pypy/module/__builtin__/functional.py	(original)
+++ pypy/branch/fast-forward/pypy/module/__builtin__/functional.py	Sat Sep 25 04:45:44 2010
@@ -164,9 +164,11 @@
     return w_max_item
 
 def max(space, __args__):
-    """Return the largest item in a sequence.
-
-    If more than one argument is passed, return the maximum of them.
+    """max(iterable[, key=func]) -> value
+    max(a, b, c, ...[, key=func]) -> value
+    
+    With a single iterable argument, return its largest item.
+    With two or more arguments, return the largest argument.
     """
     return min_max(space, __args__, "max")
 max.unwrap_spec = [ObjSpace, Arguments]



More information about the Pypy-commit mailing list