mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Use string.ascii_letters instead of string.letters (SF bug #226706).
This commit is contained in:
parent
f69868f304
commit
79e75e1916
15 changed files with 17 additions and 18 deletions
|
@ -29,7 +29,7 @@ def process(file):
|
|||
sys.stderr.write('Processing %s ...\n' % file)
|
||||
magic = 'Py_'
|
||||
for c in file:
|
||||
if c in string.letters + string.digits:
|
||||
if c in string.ascii_letters + string.digits:
|
||||
magic = magic + string.upper(c)
|
||||
else: magic = magic + '_'
|
||||
sys.stdout = f
|
||||
|
|
|
@ -422,7 +422,7 @@ class TexinfoParser:
|
|||
# Cannot happen unless spprog is changed
|
||||
raise RuntimeError, 'unexpected funny '+`c`
|
||||
start = i
|
||||
while i < n and text[i] in string.letters: i = i+1
|
||||
while i < n and text[i] in string.ascii_letters: i = i+1
|
||||
if i == start:
|
||||
# @ plus non-letter: literal next character
|
||||
i = i+1
|
||||
|
@ -1260,7 +1260,7 @@ class TexinfoParser:
|
|||
if self.itemindex: self.index(self.itemindex, args)
|
||||
if self.itemarg:
|
||||
if self.itemarg[0] == '@' and self.itemarg[1:2] and \
|
||||
self.itemarg[1] in string.letters:
|
||||
self.itemarg[1] in string.ascii_letters:
|
||||
args = self.itemarg + '{' + args + '}'
|
||||
else:
|
||||
# some other character, e.g. '-'
|
||||
|
@ -1524,7 +1524,7 @@ def makefile(nodename):
|
|||
|
||||
|
||||
# Characters that are perfectly safe in filenames and hyperlinks
|
||||
goodchars = string.letters + string.digits + '!@-=+.'
|
||||
goodchars = string.ascii_letters + string.digits + '!@-=+.'
|
||||
|
||||
# Replace characters that aren't perfectly safe by dashes
|
||||
# Underscores are bad since Cern HTTPD treats them as delimiters for
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue