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/2000-March/002931.html below:

[Python-Dev] __debug__ and py_compile

[Python-Dev] __debug__ and py_compile [Python-Dev] __debug__ and py_compileGuido van Rossum guido@python.org
Tue, 28 Mar 2000 23:08:12 -0500
> a particularly active member of the Distutils-SIG brought the
> global '__debug__' flag to my attention, since I (and thus my code)
> didn't know if calling 'py_compile.compile()' would result in a ".pyc"
> or a ".pyo" file.  It appears that, using __debug__, you can determine
> what you're going to get.  Cool!
> 
> However, it doesn't look like you can *choose* what you're going to
> get.  Is this correct?  Ie. does the presence/absence of -O when the
> interpreter starts up *completely* decide how code is compiled?

Correct.  You (currently) can't change the opt setting of the
compiler.  (It was part of the compiler restructuring to give more
freedom here; this has been pushed back to 1.7.)

> Also, can I rely on __debug__ being there in the future?  How about in
> the past?  I still occasionally ponder making Distutils compatible with
> Python 1.5.1.

__debug__ is as old as the assert statement, going back to at least
1.5.0.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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