[Python-Dev] cpython (2.7): Issue #6074: Restore the long-broken support for running with read-only source

Serhiy Storchaka storchaka at gmail.com
Fri Oct 19 15:36:03 CEST 2012


On 19.10.12 14:58, nick.coghlan wrote:
> http://hg.python.org/cpython/rev/321414874b26
> changeset:   79827:321414874b26
> branch:      2.7
> parent:      79814:2f0770cc6d3f
> user:        Nick Coghlan <ncoghlan at gmail.com>
> date:        Fri Oct 19 21:58:18 2012 +1000
> summary:
>    Issue #6074: Restore the long-broken support for running with read-only source files on Windows

> +def _iter_files(name):
>       for f in (name + os.extsep + "py",
>                 name + os.extsep + "pyc",
>                 name + os.extsep + "pyo",
>                 name + os.extsep + "pyw",
>                 name + "$py.class"):
> +        yield f

Why not just

     return (name + os.extsep + "py",
             name + os.extsep + "pyc",
             name + os.extsep + "pyo",
             name + os.extsep + "pyw",
             name + "$py.class")

?




More information about the Python-Dev mailing list