diff options
author | Fred Drake <fdrake@acm.org> | 2001-07-20 19:05:50 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-07-20 19:05:50 (GMT) |
commit | 79e75e1916c33ee8e3de4c1b6c38221f2dba315c (patch) | |
tree | 96e3e40993ba8b5e4123470493e36797b3b10fdd /Lib | |
parent | f69868f304cb2198e4f43e73d5d8873d7222cda8 (diff) | |
download | cpython-79e75e1916c33ee8e3de4c1b6c38221f2dba315c.zip cpython-79e75e1916c33ee8e3de4c1b6c38221f2dba315c.tar.gz cpython-79e75e1916c33ee8e3de4c1b6c38221f2dba315c.tar.bz2 |
Use string.ascii_letters instead of string.letters (SF bug #226706).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/Cookie.py | 2 | ||||
-rw-r--r-- | Lib/cmd.py | 2 | ||||
-rw-r--r-- | Lib/dospath.py | 2 | ||||
-rw-r--r-- | Lib/lib-old/codehack.py | 2 | ||||
-rw-r--r-- | Lib/ntpath.py | 2 | ||||
-rw-r--r-- | Lib/plat-riscos/riscospath.py | 2 | ||||
-rw-r--r-- | Lib/test/test_mimetools.py | 2 | ||||
-rw-r--r-- | Lib/tokenize.py | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/Lib/Cookie.py b/Lib/Cookie.py index dd116b7..3fc2ffc 100644 --- a/Lib/Cookie.py +++ b/Lib/Cookie.py @@ -249,7 +249,7 @@ class CookieError(Exception): # _LegalChars is the list of chars which don't require "'s # _Translator hash-table for fast quoting # -_LegalChars = string.letters + string.digits + "!#$%&'*+-.^_`|~" +_LegalChars = string.ascii_letters + string.digits + "!#$%&'*+-.^_`|~" _Translator = { '\000' : '\\000', '\001' : '\\001', '\002' : '\\002', '\003' : '\\003', '\004' : '\\004', '\005' : '\\005', @@ -40,7 +40,7 @@ import string, sys __all__ = ["Cmd"] PROMPT = '(Cmd) ' -IDENTCHARS = string.letters + string.digits + '_' +IDENTCHARS = string.ascii_letters + string.digits + '_' class Cmd: prompt = PROMPT diff --git a/Lib/dospath.py b/Lib/dospath.py index ed35d59..958f9f6 100644 --- a/Lib/dospath.py +++ b/Lib/dospath.py @@ -241,7 +241,7 @@ def expandvars(path): if '$' not in path: return path import string - varchars = string.letters + string.digits + '_-' + varchars = string.ascii_letters + string.digits + "_-" res = '' index = 0 pathlen = len(path) diff --git a/Lib/lib-old/codehack.py b/Lib/lib-old/codehack.py index 52ac6be..248205b 100644 --- a/Lib/lib-old/codehack.py +++ b/Lib/lib-old/codehack.py @@ -31,7 +31,7 @@ import linecache # Because this is a pretty expensive hack, a cache is kept. SET_LINENO = 127 # The opcode (see "opcode.h" in the Python source) -identchars = string.letters + string.digits + '_' # Identifier characters +identchars = string.ascii_letters + string.digits + '_' # Identifier characters _namecache = {} # The cache diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 13de59b..d81e8fb 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -334,7 +334,7 @@ def expandvars(path): if '$' not in path: return path import string - varchars = string.letters + string.digits + '_-' + varchars = string.ascii_letters + string.digits + '_-' res = '' index = 0 pathlen = len(path) diff --git a/Lib/plat-riscos/riscospath.py b/Lib/plat-riscos/riscospath.py index d55a8b8..32f39ba 100644 --- a/Lib/plat-riscos/riscospath.py +++ b/Lib/plat-riscos/riscospath.py @@ -62,7 +62,7 @@ def _split(p): s= q # find end of main FS name, not including special field else: for c in p[dash:s]: - if c not in string.letters: + if c not in string.ascii_letters: q= 0 break # disallow invalid non-special-field characters in FS name r= q diff --git a/Lib/test/test_mimetools.py b/Lib/test/test_mimetools.py index 4ee11a1..0300714 100644 --- a/Lib/test/test_mimetools.py +++ b/Lib/test/test_mimetools.py @@ -2,7 +2,7 @@ from test_support import TestFailed import mimetools import string,StringIO -start = string.letters + "=" + string.digits + "\n" +start = string.ascii_letters + "=" + string.digits + "\n" for enc in ['7bit','8bit','base64','quoted-printable']: print enc, i = StringIO.StringIO(start) diff --git a/Lib/tokenize.py b/Lib/tokenize.py index cbe4552..33c5e41 100644 --- a/Lib/tokenize.py +++ b/Lib/tokenize.py @@ -133,7 +133,7 @@ def tokenize_loop(readline, tokeneater): def generate_tokens(readline): lnum = parenlev = continued = 0 - namechars, numchars = string.letters + '_', string.digits + namechars, numchars = string.ascii_letters + '_', '0123456789' contstr, needcont = '', 0 contline = None indents = [0] |