Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
c17a0b87
Kaydet (Commit)
c17a0b87
authored
Haz 04, 2016
tarafından
Zachary Ware
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #26809: Add __all__ to string module. Patch by Emanuel Barry
üst
78b642c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
string.py
Lib/string.py
+7
-3
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/string.py
Dosyayı görüntüle @
c17a0b87
...
@@ -14,6 +14,10 @@ printable -- a string containing all ASCII characters considered printable
...
@@ -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
import
_string
# Some strings for ctype-style character classification
# Some strings for ctype-style character classification
...
@@ -46,7 +50,7 @@ def capwords(s, sep=None):
...
@@ -46,7 +50,7 @@ def capwords(s, sep=None):
####################################################################
####################################################################
import
re
as
_re
import
re
as
_re
from
collections
import
ChainMap
from
collections
import
ChainMap
as
_ChainMap
class
_TemplateMetaclass
(
type
):
class
_TemplateMetaclass
(
type
):
pattern
=
r"""
pattern
=
r"""
...
@@ -104,7 +108,7 @@ class Template(metaclass=_TemplateMetaclass):
...
@@ -104,7 +108,7 @@ class Template(metaclass=_TemplateMetaclass):
if
not
args
:
if
not
args
:
mapping
=
kws
mapping
=
kws
elif
kws
:
elif
kws
:
mapping
=
ChainMap
(
kws
,
args
[
0
])
mapping
=
_
ChainMap
(
kws
,
args
[
0
])
else
:
else
:
mapping
=
args
[
0
]
mapping
=
args
[
0
]
# Helper function for .sub()
# Helper function for .sub()
...
@@ -134,7 +138,7 @@ class Template(metaclass=_TemplateMetaclass):
...
@@ -134,7 +138,7 @@ class Template(metaclass=_TemplateMetaclass):
if
not
args
:
if
not
args
:
mapping
=
kws
mapping
=
kws
elif
kws
:
elif
kws
:
mapping
=
ChainMap
(
kws
,
args
[
0
])
mapping
=
_
ChainMap
(
kws
,
args
[
0
])
else
:
else
:
mapping
=
args
[
0
]
mapping
=
args
[
0
]
# Helper function for .sub()
# Helper function for .sub()
...
...
Misc/NEWS
Dosyayı görüntüle @
c17a0b87
...
@@ -131,6 +131,8 @@ Core and Builtins
...
@@ -131,6 +131,8 @@ Core and Builtins
Library
Library
-------
-------
- Issue #26809: Add ``__all__`` to :mod:`string`. Patch by Emanuel Barry.
- Issue #26373: subprocess.Popen.communicate now correctly ignores
- Issue #26373: subprocess.Popen.communicate now correctly ignores
BrokenPipeError when the child process dies before .communicate()
BrokenPipeError when the child process dies before .communicate()
is called in more/all circumstances.
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