summaryrefslogtreecommitdiff
path: root/Tools/i18n
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-22 00:21:25 +0000
committerGuido van Rossum <guido@python.org>2006-08-22 00:21:25 +0000
commit40bf2198036e57411af7de94dd9e9defa5dfbf97 (patch)
tree81352a24a090008c4ceddf1d0c395b77a99cfd41 /Tools/i18n
parentda75e2c418b3262a06733b8db7c7e6cc547e1c8e (diff)
downloadcpython-40bf2198036e57411af7de94dd9e9defa5dfbf97.tar.gz
Kill reduce(). A coproduction of John Reese, Jacques Frechet, and Alex M.
Diffstat (limited to 'Tools/i18n')
-rwxr-xr-xTools/i18n/pygettext.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Tools/i18n/pygettext.py b/Tools/i18n/pygettext.py
index bb0dd35da9..eadd149ea4 100755
--- a/Tools/i18n/pygettext.py
+++ b/Tools/i18n/pygettext.py
@@ -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.