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/078127.html below:

[Python-Dev] Making sys.py3k_warning writable

[Python-Dev] Making sys.py3k_warning writable [Python-Dev] Making sys.py3k_warning writableBenjamin Peterson musiccomposition at gmail.com
Mon Mar 24 00:35:57 CET 2008
On Sun, Mar 23, 2008 at 6:21 PM, <skip at pobox.com> wrote:

>
> So, regarding -3 warnings in the 2.6 test code, should they be fixed or
> not?

I think we should introduce a decorator and/or a context manager in
test_support like this:
def silence_py3k(func):
    def decorator(*args, **kwargs):
       sys.disablepy3kwarning()
       func(*args, **kwargs)
       sys.enablepy3kwarning()
    return decorator
Of course, this depends on my patch in issue 2458. I think we could also do
it with warnings.simplefilter.

>
>
> Skip
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> http://mail.python.org/mailman/options/python-dev/musiccomposition%40gmail.com
>



-- 
Cheers,
Benjamin Peterson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080323/e3f331a4/attachment.htm 
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