Mercurial > cpython-lru_cache-weakref
diff Lib/importlib/_bootstrap.py @ 76327:1ca10eb58483
utilize startswith(tuple)
| author | Philip Jenvey <pjenvey@underboss.org> |
|---|---|
| date | Sun, 15 Apr 2012 12:21:32 -0700 |
| parents | 9e8cbf07068a |
| children | 95c29787320a |
line wrap: on
line diff
--- a/Lib/importlib/_bootstrap.py Sun Apr 15 16:32:04 2012 +0100 +++ b/Lib/importlib/_bootstrap.py Sun Apr 15 12:21:32 2012 -0700 @@ -23,7 +23,7 @@ def _make_relax_case(): - if any(map(sys.platform.startswith, CASE_INSENSITIVE_PLATFORMS)): + if sys.platform.startswith(CASE_INSENSITIVE_PLATFORMS): def _relax_case(): """True if filenames must be checked case-insensitively.""" return b'PYTHONCASEOK' in _os.environ @@ -163,7 +163,7 @@ def verbose_message(message, *args): """Print the message to stderr if -v/PYTHONVERBOSE is turned on.""" if sys.flags.verbose: - if not message.startswith('#') and not message.startswith('import '): + if not message.startswith(('#', 'import ')): message = '# ' + message print(message.format(*args), file=sys.stderr)
