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/2008-March/077935.html below:

[Python-Dev] Checking for the -3 flag from Python code

[Python-Dev] Checking for the -3 flag from Python code [Python-Dev] Checking for the -3 flag from Python codeNick Coghlan ncoghlan at gmail.com
Thu Mar 20 18:36:38 CET 2008
Steven Bethard wrote:
> On Wed, Mar 19, 2008 at 5:51 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> This flag is exposed to python code as sys.flags.py3k_warning
>>
>>  So the hack added to some of the test code that I saw go by on
>>  python-checkins isn't needed :)
> 
> Excellent.  I asked around at the sprints and everyone thought it was
> unexposed.  If no one else has already done it, I'll remove the hacks
> from test_py3kwarn and the regrtest skipping mechanism.

Brett's subsequent checkin pointed out that that particular flag is 
exposed even more directly as sys.py3kwarning, in addition to being 
accessible via the general 'command line flags' object.

The downside of the module level attribute is that it gives the illusion 
of being writable without actually having any effect when writing to it. 
The inconsistent spelling between sys.py3kwarning and 
sys.flags.py3k_warning is also a minor irritation - are we actually 
gaining anything by having both mechanisms for accessing the flag value?

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
More information about the Python-Dev mailing list

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