mirror of https://github.com/python/cpython.git
utilize startswith(tuple)
This commit is contained in:
parent
da4210f77d
commit
f8f3190d32
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
|
|
||||||
def _make_relax_case():
|
def _make_relax_case():
|
||||||
if any(map(sys.platform.startswith, CASE_INSENSITIVE_PLATFORMS)):
|
if sys.platform.startswith(CASE_INSENSITIVE_PLATFORMS):
|
||||||
def _relax_case():
|
def _relax_case():
|
||||||
"""True if filenames must be checked case-insensitively."""
|
"""True if filenames must be checked case-insensitively."""
|
||||||
return b'PYTHONCASEOK' in _os.environ
|
return b'PYTHONCASEOK' in _os.environ
|
||||||
|
@ -163,7 +163,7 @@ def _wrap(new, old):
|
||||||
def verbose_message(message, *args):
|
def verbose_message(message, *args):
|
||||||
"""Print the message to stderr if -v/PYTHONVERBOSE is turned on."""
|
"""Print the message to stderr if -v/PYTHONVERBOSE is turned on."""
|
||||||
if sys.flags.verbose:
|
if sys.flags.verbose:
|
||||||
if not message.startswith('#') and not message.startswith('import '):
|
if not message.startswith(('#', 'import ')):
|
||||||
message = '# ' + message
|
message = '# ' + message
|
||||||
print(message.format(*args), file=sys.stderr)
|
print(message.format(*args), file=sys.stderr)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue