diff Lib/ConfigParser.py @ 19343:7257e87e0720 legacy-trunk

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.
author Martin v. Löwis <martin@v.loewis.de>
date Fri, 17 Aug 2001 18:39:25 +0000
parents 373b6abadc50
children 56f17810534c
line wrap: on
line diff
--- a/Lib/ConfigParser.py	Fri Aug 17 17:36:00 2001 +0000
+++ b/Lib/ConfigParser.py	Fri Aug 17 18:39:25 2001 +0000
@@ -82,7 +82,7 @@
         write the configuration state in .ini format
 """
 
-import string
+import string, types
 import re
 
 __all__ = ["NoSectionError","DuplicateSectionError","NoOptionError",
@@ -222,7 +222,7 @@
         configuration files in the list will be read.  A single
         filename may also be given.
         """
-        if type(filenames) in [type(''), type(u'')]:
+        if type(filenames) in types.StringTypes:
             filenames = [filenames]
         for filename in filenames:
             try: