diff options
| author | Guido van Rossum <guido@python.org> | 1993-07-29 09:37:38 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1993-07-29 09:37:38 +0000 |
| commit | 73e92c495500813014ca7e2f03deda42d43d48a0 (patch) | |
| tree | c876c10b7f1c76f2d4b73d3513bbf2bb485eda98 /Lib/stringold.py | |
| parent | 6598c579c79a74fc778c4bf1660dcc5af0c377f4 (diff) | |
| download | cpython-73e92c495500813014ca7e2f03deda42d43d48a0.tar.gz | |
* pdb.py: set 'privileged' property when evaluating expressions
* string.py: change whitespace to include \r, \v and \f.
When importing strop succeeds, re-evaluate meaning of letters.
Diffstat (limited to 'Lib/stringold.py')
| -rw-r--r-- | Lib/stringold.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/stringold.py b/Lib/stringold.py index 8c7d102b46..ccc10431e4 100644 --- a/Lib/stringold.py +++ b/Lib/stringold.py @@ -5,7 +5,7 @@ # functions imported from built-in module "strop". # Some strings for ctype-style character classification -whitespace = ' \t\n' +whitespace = ' \t\n\r\v\f' lowercase = 'abcdefghijklmnopqrstuvwxyz' uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' letters = lowercase + uppercase @@ -181,10 +181,13 @@ def expandtabs(s, tabsize): # Try importing optional built-in module "strop" -- if it exists, # it redefines some string operations that are 100-1000 times faster. +# It also defines values for whitespace, lowercase and uppercase +# that match <ctype.h>'s definitions. # The manipulation with index_error is needed for compatibility. try: from strop import * + letters = lowercase + uppercase from strop import index index_error = ValueError except ImportError: |
