]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use a dict for faster sysconfig startup (issue #13150)
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 11 Oct 2011 14:07:30 +0000 (16:07 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 11 Oct 2011 14:07:30 +0000 (16:07 +0200)
Lib/sysconfig.py

index d07784d9670cda15e2b5330d423793b39d65c8ab..6594104e0652d0953cf65f8125e5d9f70caeccaa 100644 (file)
@@ -24,7 +24,7 @@ __all__ = [
 # XXX _CONFIG_DIR will be set by the Makefile later
 _CONFIG_DIR = os.path.normpath(os.path.dirname(__file__))
 _CONFIG_FILE = os.path.join(_CONFIG_DIR, 'sysconfig.cfg')
-_SCHEMES = RawConfigParser()
+_SCHEMES = RawConfigParser(dict_type=dict)   # Faster than OrderedDict
 _SCHEMES.read(_CONFIG_FILE)
 _VAR_REPL = re.compile(r'\{([^{]*?)\}')