diff options
author | Zachary Ware <zachary.ware@gmail.com> | 2016-06-04 19:41:42 (GMT) |
---|---|---|
committer | Zachary Ware <zachary.ware@gmail.com> | 2016-06-04 19:41:42 (GMT) |
commit | 8bc9378c98e0dab872e41c59e1cb00c0fab1a146 (patch) | |
tree | 4ad4a39eafea86672131a4ae6507d5c355f35c82 /Lib/string.py | |
parent | 410ef8e23088ab2b8bd92ac70a8176f71da2b931 (diff) | |
parent | c17a0b87a682dab464d40a8ae1d16c009a1818ce (diff) | |
download | cpython-8bc9378c98e0dab872e41c59e1cb00c0fab1a146.zip cpython-8bc9378c98e0dab872e41c59e1cb00c0fab1a146.tar.gz cpython-8bc9378c98e0dab872e41c59e1cb00c0fab1a146.tar.bz2 |
Closes #26809: Merge with 3.5
Diffstat (limited to 'Lib/string.py')
-rw-r--r-- | Lib/string.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/string.py b/Lib/string.py index 1add44b..7298c89 100644 --- a/Lib/string.py +++ b/Lib/string.py @@ -14,6 +14,10 @@ printable -- a string containing all ASCII characters considered printable """ +__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 @@ def capwords(s, sep=None): #################################################################### import re as _re -from collections import ChainMap +from collections import ChainMap as _ChainMap class _TemplateMetaclass(type): pattern = r""" @@ -104,7 +108,7 @@ class Template(metaclass=_TemplateMetaclass): 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 @@ class Template(metaclass=_TemplateMetaclass): 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() |