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
967f1e3b
Kaydet (Commit)
967f1e3b
authored
Agu 14, 2007
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove string.{letters,lowercase,uppercase}.
üst
5424df2f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
17 additions
and
46 deletions
+17
-46
libstring.tex
Doc/lib/libstring.tex
+3
-30
string.py
Lib/string.py
+3
-6
test_csv.py
Lib/test/test_csv.py
+1
-1
test_pkgimport.py
Lib/test/test_pkgimport.py
+2
-2
test_string.py
Lib/test/test_string.py
+3
-3
NEWS
Misc/NEWS
+2
-1
modulator.py
Tools/modulator/modulator.py
+2
-2
texi2html.py
Tools/scripts/texi2html.py
+1
-1
No files found.
Doc/lib/libstring.tex
Dosyayı görüntüle @
967f1e3b
...
...
@@ -13,18 +13,18 @@ functions based on regular expressions.
The constants defined in this module are:
\begin{datadesc}
{
ascii
_
letters
}
\begin{datadesc}
{
ascii
\
_
letters
}
The concatenation of the
\constant
{
ascii
_
lowercase
}
and
\constant
{
ascii
_
uppercase
}
constants described below. This value is
not locale-dependent.
\end{datadesc}
\begin{datadesc}
{
ascii
_
lowercase
}
\begin{datadesc}
{
ascii
\
_
lowercase
}
The lowercase letters
\code
{
'abcdefghijklmnopqrstuvwxyz'
}
. This
value is not locale-dependent and will not change.
\end{datadesc}
\begin{datadesc}
{
ascii
_
uppercase
}
\begin{datadesc}
{
ascii
\
_
uppercase
}
The uppercase letters
\code
{
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
}
. This
value is not locale-dependent and will not change.
\end{datadesc}
...
...
@@ -37,23 +37,6 @@ The constants defined in this module are:
The string
\code
{
'0123456789abcdefABCDEF'
}
.
\end{datadesc}
\begin{datadesc}
{
letters
}
The concatenation of the strings
\constant
{
lowercase
}
and
\constant
{
uppercase
}
described below. The specific value is
locale-dependent, and will be updated when
\function
{
locale.setlocale()
}
is called.
\end{datadesc}
\begin{datadesc}
{
lowercase
}
A string containing all the characters that are considered lowercase
letters. On most systems this is the string
\code
{
'abcdefghijklmnopqrstuvwxyz'
}
. Do not change its definition ---
the effect on the routines
\function
{
upper()
}
and
\function
{
swapcase()
}
is undefined. The specific value is
locale-dependent, and will be updated when
\function
{
locale.setlocale()
}
is called.
\end{datadesc}
\begin{datadesc}
{
octdigits
}
The string
\code
{
'01234567'
}
.
\end{datadesc}
...
...
@@ -69,16 +52,6 @@ The constants defined in this module are:
\constant
{
punctuation
}
, and
\constant
{
whitespace
}
.
\end{datadesc}
\begin{datadesc}
{
uppercase
}
A string containing all the characters that are considered uppercase
letters. On most systems this is the string
\code
{
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
}
. Do not change its definition ---
the effect on the routines
\function
{
lower()
}
and
\function
{
swapcase()
}
is undefined. The specific value is
locale-dependent, and will be updated when
\function
{
locale.setlocale()
}
is called.
\end{datadesc}
\begin{datadesc}
{
whitespace
}
A string containing all characters that are considered whitespace.
On most systems this includes the characters space, tab, linefeed,
...
...
Lib/string.py
Dosyayı görüntüle @
967f1e3b
...
...
@@ -16,17 +16,14 @@ printable -- a string containing all characters considered printable
# Some strings for ctype-style character classification
whitespace
=
'
\t\n\r\v\f
'
lowercase
=
'abcdefghijklmnopqrstuvwxyz'
uppercase
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
letters
=
lowercase
+
uppercase
ascii_lowercase
=
lowercase
ascii_uppercase
=
uppercase
ascii_lowercase
=
'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase
=
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_letters
=
ascii_lowercase
+
ascii_uppercase
digits
=
'0123456789'
hexdigits
=
digits
+
'abcdef'
+
'ABCDEF'
octdigits
=
'01234567'
punctuation
=
"""!"#$
%
&'()*+,-./:;<=>?@[
\
]^_`{|}~"""
printable
=
digits
+
letters
+
punctuation
+
whitespace
printable
=
digits
+
ascii_
letters
+
punctuation
+
whitespace
# Case conversion helpers
# Use str to convert Unicode literal in case of -U
...
...
Lib/test/test_csv.py
Dosyayı görüntüle @
967f1e3b
...
...
@@ -645,7 +645,7 @@ class TestArrayWrites(unittest.TestCase):
def
test_char_write
(
self
):
import
array
,
string
a
=
array
.
array
(
'u'
,
string
.
letters
)
a
=
array
.
array
(
'u'
,
string
.
ascii_
letters
)
with
TemporaryFile
(
"w+b"
)
as
fileobj
:
writer
=
csv
.
writer
(
fileobj
,
dialect
=
"excel"
)
...
...
Lib/test/test_pkgimport.py
Dosyayı görüntüle @
967f1e3b
...
...
@@ -7,7 +7,7 @@ class TestImport(unittest.TestCase):
def
__init__
(
self
,
*
args
,
**
kw
):
self
.
package_name
=
'PACKAGE_'
while
self
.
package_name
in
sys
.
modules
:
self
.
package_name
+=
random
.
choose
(
string
.
letters
)
self
.
package_name
+=
random
.
choose
(
string
.
ascii_
letters
)
self
.
module_name
=
self
.
package_name
+
'.foo'
unittest
.
TestCase
.
__init__
(
self
,
*
args
,
**
kw
)
...
...
@@ -58,7 +58,7 @@ class TestImport(unittest.TestCase):
# ...make up a variable name that isn't bound in __builtins__
var
=
'a'
while
var
in
dir
(
__builtins__
):
var
+=
random
.
choose
(
string
.
letters
)
var
+=
random
.
choose
(
string
.
ascii_
letters
)
# ...make a module that just contains that
self
.
rewrite_file
(
var
)
...
...
Lib/test/test_string.py
Dosyayı görüntüle @
967f1e3b
...
...
@@ -6,9 +6,9 @@ class ModuleTest(unittest.TestCase):
def
test_attrs
(
self
):
string
.
whitespace
string
.
lowercase
string
.
uppercase
string
.
letters
string
.
ascii_
lowercase
string
.
ascii_
uppercase
string
.
ascii_
letters
string
.
digits
string
.
hexdigits
string
.
octdigits
...
...
Misc/NEWS
Dosyayı görüntüle @
967f1e3b
...
...
@@ -202,7 +202,8 @@ Library
- Remove obsolete functions:
* commands.getstatus(), os.popen*,
- Remove functions in the string module that are also string methods.
- Remove functions in the string module that are also string methods;
Remove string.{letters, lowercase, uppercase}.
- Remove support for long obsolete platforms: plat-aix3, plat-irix5.
...
...
Tools/modulator/modulator.py
Dosyayı görüntüle @
967f1e3b
...
...
@@ -30,8 +30,8 @@ import string
oops
=
'oops'
IDENTSTARTCHARS
=
string
.
letters
+
'_'
IDENTCHARS
=
string
.
letters
+
string
.
digits
+
'_'
IDENTSTARTCHARS
=
string
.
ascii_
letters
+
'_'
IDENTCHARS
=
string
.
ascii_
letters
+
string
.
digits
+
'_'
# Check that string is a legal C identifier
def
checkid
(
str
):
...
...
Tools/scripts/texi2html.py
Dosyayı görüntüle @
967f1e3b
...
...
@@ -2000,7 +2000,7 @@ def fixfunnychars(addr):
def
increment
(
s
):
if
not
s
:
return
'1'
for
sequence
in
string
.
digits
,
string
.
lowercase
,
string
.
uppercase
:
for
sequence
in
string
.
digits
,
string
.
ascii_lowercase
,
string
.
ascii_
uppercase
:
lastc
=
s
[
-
1
]
if
lastc
in
sequence
:
i
=
sequence
.
index
(
lastc
)
+
1
...
...
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