summaryrefslogtreecommitdiff
path: root/Lib/string.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-02-26 01:02:51 +0000
committerRaymond Hettinger <python@rcn.com>2011-02-26 01:02:51 +0000
commit9fe1ccfb5ac8c38be1439151712d3a8b3e7d87f2 (patch)
treeedf92add219a4a427b21157a626f1c0520fd644f /Lib/string.py
parent692f038a5dad826254fe73050063862d76dc7baa (diff)
downloadcpython-git-9fe1ccfb5ac8c38be1439151712d3a8b3e7d87f2.tar.gz
Issue #11297: Add collections.ChainMap()
Diffstat (limited to 'Lib/string.py')
-rw-r--r--Lib/string.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/string.py b/Lib/string.py
index 2bc5d00803..d4f9cd9355 100644
--- a/Lib/string.py
+++ b/Lib/string.py
@@ -46,7 +46,7 @@ def capwords(s, sep=None):
####################################################################
import re as _re
-from collections import _ChainMap
+from collections import ChainMap
class _TemplateMetaclass(type):
pattern = r"""
@@ -100,7 +100,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()
@@ -126,7 +126,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()