[Python-Dev] [Python-checkins] cpython: Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new
Nick Coghlan
ncoghlan at gmail.com
Mon Feb 20 04:09:28 CET 2012
On Mon, Feb 20, 2012 at 10:55 AM, antoine.pitrou
<python-checkins at python.org> wrote:
> +def _relax_case():
> + """True if filenames must be checked case-insensitively."""
> + if any(map(sys.platform.startswith, CASE_INSENSITIVE_PLATFORMS)):
> + def _relax_case():
> + return b'PYTHONCASEOK' in _os.environ
> else:
> - return True
Wow, that's horrendously confusing. Please change the name of the
factory function to "_make_relax_case" (or something, anything that
isn't "_relax_case" would be an improvement).
Also, the docstring should be on the created functions, not the
factory function.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-Dev
mailing list