[Python-Dev] Is it intentional that "sys.__debug__ = 1" is illegal in Python 2.7?
Benjamin Peterson
benjamin at python.org
Mon Aug 2 04:56:57 CEST 2010
2010/7/30 Barry Warsaw <barry at python.org>:
>
> It looks like Benjamin's change in r67171 was the relevant diff.
The reason behind this was to make __debug__ assignment consistent
with that of other reserved names. For example, x.None = 3 raised and
thus, so should x.__debug__ = 3.
--
Regards,
Benjamin
More information about the Python-Dev
mailing list