[Python-checkins] cpython (merge 3.5 -> default): Closes #26809: Merge with 3.5
zach.ware
python-checkins at python.org
Sat Jun 4 15:42:16 EDT 2016
https://hg.python.org/cpython/rev/21ae58b77924
changeset: 101709:21ae58b77924
parent: 101707:780cbe18082e
parent: 101708:8136f9623d7f
user: Zachary Ware <zachary.ware at gmail.com>
date: Sat Jun 04 14:41:42 2016 -0500
summary:
Closes #26809: Merge with 3.5
files:
Lib/string.py | 10 +++++++---
Misc/NEWS | 2 ++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/Lib/string.py b/Lib/string.py
--- a/Lib/string.py
+++ b/Lib/string.py
@@ -14,6 +14,10 @@
"""
+__all__ = ["ascii_letters", "ascii_lowercase", "ascii_uppercase", "capwords",
+ "digits", "hexdigits", "octdigits", "printable", "punctuation",
+ "whitespace", "Formatter", "Template"]
+
import _string
# Some strings for ctype-style character classification
@@ -46,7 +50,7 @@
####################################################################
import re as _re
-from collections import ChainMap
+from collections import ChainMap as _ChainMap
class _TemplateMetaclass(type):
pattern = r"""
@@ -104,7 +108,7 @@
if not args:
mapping = kws
elif kws:
- mapping = ChainMap(kws, args[0])
+ mapping = _ChainMap(kws, args[0])
else:
mapping = args[0]
# Helper function for .sub()
@@ -131,7 +135,7 @@
if not args:
mapping = kws
elif kws:
- mapping = ChainMap(kws, args[0])
+ mapping = _ChainMap(kws, args[0])
else:
mapping = args[0]
# Helper function for .sub()
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -27,6 +27,8 @@
Library
-------
+- Issue #26809: Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry.
+
- Issue #26373: subprocess.Popen.communicate now correctly ignores
BrokenPipeError when the child process dies before .communicate()
is called in more/all circumstances.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list