Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8bc9378c
Commit
8bc9378c
authored
Jun 04, 2016
by
Zachary Ware
Browse files
Options
Browse Files
Download
Plain Diff
Closes #26809: Merge with 3.5
parents
410ef8e2
c17a0b87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
Lib/string.py
Lib/string.py
+7
-3
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/string.py
View file @
8bc9378c
...
...
@@ -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()
...
...
Misc/NEWS
View file @
8bc9378c
...
...
@@ -27,6 +27,8 @@ Core and Builtins
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment