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/2006-November/069822.html below:

[Python-Dev] Importing .pyc in -O mode and vice versa

[Python-Dev] Importing .pyc in -O mode and vice versa [Python-Dev] Importing .pyc in -O mode and vice versa"Martin v. Löwis" martin at v.loewis.de
Sat Nov 4 16:47:37 CET 2006
Patch #1346572 proposes to also search for .pyc when OptimizeFlag
is set, and for .pyo when it is not set. The author argues this is
for consistency, as the zipimporter already does that.

This reasoning is somewhat flawed, of course: to achieve consistency,
one could also change the zipimporter instead.

However, I find the proposed behaviour reasonable: Python already
automatically imports the .pyc file if .py is not given and vice
versa. So why not look for .pyo if the .pyc file is not present?

What do you think?

Regards,
Martin
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