diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2001-08-17 18:39:25 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2001-08-17 18:39:25 +0000 |
commit | 5bdec473385e974d9aa3446279a138e8d2c37256 (patch) | |
tree | 535ae2f9d985f73decdc8439d87130cc57108abf /Lib/types.py | |
parent | 6a9c7b23fdfe4f8c01ca7148625356b4fed5946f (diff) | |
download | cpython-5bdec473385e974d9aa3446279a138e8d2c37256.tar.gz |
Patch #445762: Support --disable-unicode
- Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled
- check for Py_USING_UNICODE in all places that use Unicode functions
- disables unicode literals, and the builtin functions
- add the types.StringTypes list
- remove Unicode literals from most tests.
Diffstat (limited to 'Lib/types.py')
-rw-r--r-- | Lib/types.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/types.py b/Lib/types.py index 01af463640..6c23e244e2 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -19,7 +19,12 @@ except NameError: pass StringType = str -UnicodeType = unicode +try: + UnicodeType = unicode + StringTypes = [StringType, UnicodeType] +except NameError: + StringTypes = [StringType] + BufferType = type(buffer('')) TupleType = tuple |