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/2008-August/082080.html below:

[Python-Dev] confusing exec error message in 3.0

[Python-Dev] confusing exec error message in 3.0 [Python-Dev] confusing exec error message in 3.0Greg Ewing greg.ewing at canterbury.ac.nz
Fri Aug 29 03:39:01 CEST 2008
Steven D'Aprano wrote:

> I don't think M.__file__ should lie and say it was loaded from a file 
> that it wasn't loaded from. It's useful to be able to look at a module 
> and see what file it was actually loaded from.

On the other hand, it could be useful to be able to find
the source file for a module, regardless of whether it
was loaded from a .py, .pyc or .pyo.

Maybe there should be a __source__ attribute for that?

Or is os.path.splitext(M.__file__)[0] + ".py" considered
good enough for that?

-- 
Greg
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