This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nmusolino
Recipients nmusolino
Date 2019-06-27.20:12:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1561666356.12.0.770059184223.issue37435@roundup.psfhosted.org>
In-reply-to
Content
The builtin `map` function takes one or more user-supplied iterators, and returns an iterator.

When all the user-supplied iterator arguments to `map` provide a valid length hint (according to the PEP 424 length hint protocol), the iterator returned by `map` should provide a length hint.  

I suggest the following behavior:  when all the iterator arguments provide a valid length hint, the map iterator should return the minimum value among all length hint values, because it stops upon exhaustion of the shortest input iterator.

If any user-supplied iterator does *not* provide a length hint according to the PEP 424 protocol, the map iterator should return the `NotImplemented` singleton, in accordance with the protocol.

When the evaluation of `__length_hint__()` for a user-supplied iterator raises an exception, the exception should be propagated by the map iterator's `__length_hint__()` method.
History
Date User Action Args
2019-06-27 20:12:36nmusolinosetrecipients: + nmusolino
2019-06-27 20:12:36nmusolinosetmessageid: <1561666356.12.0.770059184223.issue37435@roundup.psfhosted.org>
2019-06-27 20:12:36nmusolinolinkissue37435 messages
2019-06-27 20:12:35nmusolinocreate