[Python-Dev] Is it intentional that "sys.__debug__ = 1" isillegal in Python 2.7?

Terry Reedy tjreedy at udel.edu
Mon Aug 2 01:17:58 CEST 2010


On 7/31/2010 5:02 PM, Guido van Rossum wrote:

> But yes, the docs should clarify that *any* use of __*__ names, in
> *any* context, that does not follow explicitly documented use, is
> subject to breakage without warning.

http://bugs.python.org/issue9451
Strengthen __*__ system name warning

My suggested new version, incorporating Guido's sentence:

System-defined names. These names are defined by the interpreter and its 
implementation (including the standard library). Current system names 
are discussed in the Special method names section and elsewhere. More 
will likely be defined in future versions of Python. *Any* use of __*__ 
names, in any* context, that does not follow explicitly documented use, 
is subject to breakage without warning.

-- 
Terry Jan Reedy



More information about the Python-Dev mailing list