Commit Graph

9 Commits

Author SHA1 Message Date
Jakub Stasiak
0edb87fc6b Make functools.cmp_to_key more realistic (#458)
The documentation[1] says:

    A comparison function is any callable that accept two arguments,
    compares them, and returns a negative number for less-than, zero for
    equality, or a positive number for greater-than.

This doesn't seem possible with the comparison function defined as
returning bool.

[1] https://docs.python.org/3.6/library/functools.html#functools.cmp_to_key
2016-08-10 12:12:52 -07:00
mulhern
f1d08cb420 Fix signature for reduce in some files.
I believe that the signature in stdlib/3/functools.pyi is the correct model
for all versions of reduce.
2016-03-22 10:24:44 -04:00
Guido van Rossum
e463890df7 2.7 does not have lru_cache(). 2016-01-11 08:14:11 -08:00
Guido van Rossum
87bc00eb2a Unify 2.7 and 3 stubs for functools. 2016-01-08 10:10:50 -08:00
Guido van Rossum
30af935dc7 Make partial a generic type (the parameter being the return type). 2015-11-30 15:12:42 -08:00
Matthias Kramm
94c9ce8fd0 Consistently use '= ...' for optional parameters. 2015-11-09 13:55:02 -08:00
Ben Longbons
56fe787c74 Update a bunch of stubs 2015-10-19 20:02:10 -07:00
Matthias Kramm
9ab5976585 merge builtins/2.7/functools.pyi into stdlib/ 2015-09-30 12:22:40 -07:00
Matthias Kramm
337abed05a add (overwrite with) mypy stubs, if available 2015-09-30 09:59:44 -07:00