SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 47 Python

Small changes to map() and filter():

(1) If a sequence S is shorter than len(S) indicated, don't fail --
just use the shorter size.  (I.e, len(S) is just a hint.)

(2) Implement the special case map(None, S) as list(S) -- it's faster.
G
Guido van Rossum committed
fa4ac71dd6602347d80e4cdb71f3867fb63d3578
Parent: bfc725b