On 6/13/2012 10:47 PM, R. David Murray wrote:
On Thu, 14 Jun 2012 11:48:08 +1000, Nick Coghlan<[email protected]> wrote:
Right, but by resorting to either of those approaches, people are clearly doing something that isn't formally supported by the core.
That was not clear to me until I read your post -- the key word being formally (or officially). I see now that distributing a sourceless library as a mixture of .pyc and .pyo files is even crazier that I thought.
Yes, you can do it, and most of the time it will work out OK, but any weird glitches that result are officially *not our problem*. The main reason this matters is that the "__debug__" flag is *supposed* to be process global - if you check it in one place, theOK, the above are the two concrete reasons I have heard in this thread for continuing the current behavior: 1) we do not wish to support running from .pyo files without -O being on, even if it currently happens to work 2) the __debug__ setting is supposed to be process-global Both of these are good reasons. IMO the issue should be closed with a documentation fix, which could optionally include either or both of the above motivations.
I agree. We have gotten what we need from this thread. -- Terry Jan Reedy _______________________________________________ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
