Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 79e75e1

Browse files
committed
Use string.ascii_letters instead of string.letters (SF bug #226706).
1 parent f69868f commit 79e75e1

15 files changed

Lines changed: 17 additions & 18 deletions

File tree

Demo/pdist/rcslib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RCS:
3333
"""
3434

3535
# Characters allowed in work file names
36-
okchars = string.letters + string.digits + '-_=+.'
36+
okchars = string.ascii_letters + string.digits + '-_=+'
3737

3838
def __init__(self):
3939
"""Constructor."""

Lib/Cookie.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ class CookieError(Exception):
249249
# _LegalChars is the list of chars which don't require "'s
250250
# _Translator hash-table for fast quoting
251251
#
252-
_LegalChars = string.letters + string.digits + "!#$%&'*+-.^_`|~"
252+
_LegalChars = string.ascii_letters + string.digits + "!#$%&'*+-.^_`|~"
253253
_Translator = {
254254
'\000' : '\\000', '\001' : '\\001', '\002' : '\\002',
255255
'\003' : '\\003', '\004' : '\\004', '\005' : '\\005',

Lib/cmd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
__all__ = ["Cmd"]
4141

4242
PROMPT = '(Cmd) '
43-
IDENTCHARS = string.letters + string.digits + '_'
43+
IDENTCHARS = string.ascii_letters + string.digits + '_'
4444

4545
class Cmd:
4646
prompt = PROMPT

Lib/dospath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def expandvars(path):
241241
if '$' not in path:
242242
return path
243243
import string
244-
varchars = string.letters + string.digits + '_-'
244+
varchars = string.ascii_letters + string.digits + "_-"
245245
res = ''
246246
index = 0
247247
pathlen = len(path)

Lib/lib-old/codehack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# Because this is a pretty expensive hack, a cache is kept.
3232

3333
SET_LINENO = 127 # The opcode (see "opcode.h" in the Python source)
34-
identchars = string.letters + string.digits + '_' # Identifier characters
34+
identchars = string.ascii_letters + string.digits + '_' # Identifier characters
3535

3636
_namecache = {} # The cache
3737

Lib/ntpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def expandvars(path):
334334
if '$' not in path:
335335
return path
336336
import string
337-
varchars = string.letters + string.digits + '_-'
337+
varchars = string.ascii_letters + string.digits + '_-'
338338
res = ''
339339
index = 0
340340
pathlen = len(path)

Lib/plat-riscos/riscospath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _split(p):
6262
s= q # find end of main FS name, not including special field
6363
else:
6464
for c in p[dash:s]:
65-
if c not in string.letters:
65+
if c not in string.ascii_letters:
6666
q= 0
6767
break # disallow invalid non-special-field characters in FS name
6868
r= q

Lib/test/test_mimetools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import mimetools
33

44
import string,StringIO
5-
start = string.letters + "=" + string.digits + "\n"
5+
start = string.ascii_letters + "=" + string.digits + "\n"
66
for enc in ['7bit','8bit','base64','quoted-printable']:
77
print enc,
88
i = StringIO.StringIO(start)

Lib/tokenize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def tokenize_loop(readline, tokeneater):
133133

134134
def generate_tokens(readline):
135135
lnum = parenlev = continued = 0
136-
namechars, numchars = string.letters + '_', string.digits
136+
namechars, numchars = string.ascii_letters + '_', '0123456789'
137137
contstr, needcont = '', 0
138138
contline = None
139139
indents = [0]

Mac/Tools/IDE/PyEdit.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
haveThreading = Wthreading.haveThreading
2626

2727
_scriptuntitledcounter = 1
28-
# _wordchars = string.letters + string.digits + "_"
29-
_wordchars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
28+
_wordchars = string.ascii_letters + string.digits + "_"
3029

3130

3231
runButtonLabels = ["Run all", "Stop!"]

0 commit comments

Comments
 (0)