diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2012-04-15 19:21:32 (GMT) |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2012-04-15 19:21:32 (GMT) |
commit | f8f3190d321b54c14eccffef1d12021417a6719c (patch) | |
tree | 9dac3756107c845fff671a0fa3bb9e4e966feee5 /Lib/importlib | |
parent | da4210f77d2fe10667b8620d46eb9d3c3fd9e613 (diff) | |
download | cpython-f8f3190d321b54c14eccffef1d12021417a6719c.zip cpython-f8f3190d321b54c14eccffef1d12021417a6719c.tar.gz cpython-f8f3190d321b54c14eccffef1d12021417a6719c.tar.bz2 |
utilize startswith(tuple)
Diffstat (limited to 'Lib/importlib')
-rw-r--r-- | Lib/importlib/_bootstrap.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py index ee9936f..a7857c2 100644 --- a/Lib/importlib/_bootstrap.py +++ b/Lib/importlib/_bootstrap.py @@ -23,7 +23,7 @@ CASE_INSENSITIVE_PLATFORMS = 'win', 'cygwin', 'darwin' 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 @@ code_type = type(_wrap.__code__) 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) |