[Python-checkins] Changed lambda to str.strip in _strip_spaces in logging.config (#4332)

Vinay Sajip webhook-mailer at python.org
Wed Nov 15 04:28:19 EST 2017


https://github.com/python/cpython/commit/2ae4ad7ca49f2b80a02cbf7ea76d52c615bfedb3
commit: 2ae4ad7ca49f2b80a02cbf7ea76d52c615bfedb3
branch: master
author: sanjayp <sanjaypillai11 at gmail.com>
committer: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: 2017-11-15T09:28:11Z
summary:

Changed lambda to str.strip in _strip_spaces in logging.config (#4332)

files:
M Lib/logging/config.py

diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index b08cba06875..7927e761877 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -97,7 +97,7 @@ def _resolve(name):
     return found
 
 def _strip_spaces(alist):
-    return map(lambda x: x.strip(), alist)
+    return map(str.strip, alist)
 
 def _create_formatters(cp):
     """Create and return formatters"""
@@ -185,7 +185,7 @@ def _install_loggers(cp, handlers, disable_existing):
     # configure the root first
     llist = cp["loggers"]["keys"]
     llist = llist.split(",")
-    llist = list(map(lambda x: x.strip(), llist))
+    llist = list(_strip_spaces(llist))
     llist.remove("root")
     section = cp["logger_root"]
     root = logging.root



More information about the Python-checkins mailing list