mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Kill reduce(). A coproduction of John Reese, Jacques Frechet, and Alex M.
This commit is contained in:
parent
6cefeb0e81
commit
89da5d7c3d
10 changed files with 25 additions and 144 deletions
|
@ -462,12 +462,10 @@ class TokenEater:
|
|||
rentries = reverse[rkey]
|
||||
rentries.sort()
|
||||
for k, v in rentries:
|
||||
isdocstring = 0
|
||||
# If the entry was gleaned out of a docstring, then add a
|
||||
# comment stating so. This is to aid translators who may wish
|
||||
# to skip translating some unimportant docstrings.
|
||||
if reduce(operator.__add__, v.values()):
|
||||
isdocstring = 1
|
||||
isdocstring = any(v.values())
|
||||
# k is the message string, v is a dictionary-set of (filename,
|
||||
# lineno) tuples. We want to sort the entries in v first by
|
||||
# file name and then by line number.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue