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 steven.daprano
Recipients steven.daprano
Date 2017-12-14.13:26:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za>
In-reply-to
Content
The functools module imports reduce from _functools, using a guard in case it is not present:

try:
    from _functools import reduce
except ImportError:
    pass


However, the documentation says nothing about reduce being optional, and it is unconditionally included in the module __all__.

If reduce is guaranteed to be implemented in _functools, then the guard is redundant and should be removed. Otherwise, a pure python fallback should be added.

(The docs for reduce include a pure Python equivalent which might be sufficient.)
History
Date User Action Args
2017-12-14 13:26:34steven.dapranosetrecipients: + steven.daprano
2017-12-14 13:26:34steven.dapranosetmessageid: <1513257994.59.0.213398074469.issue32321@psf.upfronthosting.co.za>
2017-12-14 13:26:34steven.dapranolinkissue32321 messages
2017-12-14 13:26:34steven.dapranocreate