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

[Python-Dev] Interface to change Py3kWarning in Python

[Python-Dev] Interface to change Py3kWarning in Python [Python-Dev] Interface to change Py3kWarning in PythonBenjamin Peterson musiccomposition at gmail.com
Sat Apr 19 17:37:36 CEST 2008
On Sat, Apr 19, 2008 at 9:12 AM, Georg Brandl <g.brandl at gmx.net> wrote:
> Christian Heimes schrieb:
>  >
>  > How do you like a macro or function PyErr_Warn3k(msg) that does all the
>  > dirty work?
>
>  Which additional dirty work would it do? It should never have to do more than
>  check a simple static C variable, for obvious reasons.
Even if there's no dirty work, it could clean up this:

if (Py_Py3kWarningFlag &&
   PyErr_WarnEx(PyErr_DeprecationWarning, "msg", 2) < 0)

to

if (PyErr_WarnPy3k("msg", 2) < 0)
>
>  Georg



-- 
Cheers,
Benjamin Peterson
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