A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-February/097990.html below:

[Python-Dev] __file__

[Python-Dev] __file__Guido van Rossum guido at python.org
Sat Feb 27 02:11:11 CET 2010
On Fri, Feb 26, 2010 at 4:58 PM, Ian Bicking <ianb at colorstudy.com> wrote:
> The one issue I thought would be resolved by not easily allowing
> .pyc-only distributions is the case when you rename a file (say
> module.py to newmodule.py) and there is a module.pyc laying around,
> and you don't get the ImportError you would expect from "import
> module" -- and to make it worse everything basically works, except
> there's two versions of the module that slowly become different.  This
> regularly causes problems for me, and those problems would get more
> common and obscure if the pyc files were stashed away in a more
> invisible location.
>
> I can't even tell what the current proposal is; maybe this is
> resolved?  If distributing bytecode required renaming pyc files to .py
> as Glenn suggested that would resolve the problem quite nicely from my
> perspective.  (Frankly I find the whole use case for distributing
> bytecodes a bit specious, but whatever.)

Barry's PEP would fix this even if we kept supporting .pyc-only files:
the lingering .pyc files will be in the __pycache__ directory which is
*not* searched -- only .pyc files directly in the source directory
will be found -- where the PEP will never place them, at least not by
default.

-- 
--Guido van Rossum (python.org/~guido)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4