On Fri, Mar 22, 2002, Tim Peters wrote: > [Aahz] >> >> Hrm. Based on previous comments, particularly from the Timbot, I'm >> wondering whether the linkage between !debugging and optimizing is too >> tight in Python, > > It is, and they're not the same thing in reality. > >> and whether constructs like this should be deprecated. > > In favor of what? It (__debug__) serves a useful purpose now; that's why > it's being used, after all. Sorry, late-night terseness. I meant deprecation at the community level by BDFL fiat (similar to the way that Guido is "enforcing" distinct uses for tuples and lists). That is, the Python community would discourage the use of __debug__ for the purpose of optimizing out code. One thing that would help is if we agreed on a magic symbol *now* for optimizing out code (e.g. __optimize__), even if we don't (and we won't) implement it for 2.3. At the very least, we should IMO push people who want their code optimized out to use a function packaged inside assert; that's an interface that's not going to change, right? (Yes, Jeremy, I know that's not going to do what you want, but if you package the function definition inside of __debug__, you can mechanically fix this setup later.) I am pushing this because I think we really want people to start getting used to the idea that there *will* be a divorce eventually, even if we don't do anything at the code level for 2.3 (or even 2.4). -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "We should forget about small efficiencies, about 97% of the time. Premature optimization is the root of all evil." --Knuth
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