Re: [Python-Dev] Interface to change Py3kWarning in Python

2008-04-19 Thread Benjamin Peterson
On Sat, Apr 19, 2008 at 9:12 AM, Georg Brandl <[EMAIL PROTECTED]> 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 simpl

Re: [Python-Dev] Interface to change Py3kWarning in Python

2008-04-19 Thread Georg Brandl
Christian Heimes schrieb: > Benjamin Peterson schrieb: >> I currently have a patch to make it possible to change py3k warnings >> in Python through new functions in sys: issue 2458. I realize the >> functions are rather ugly, but I don't think there is another >> practical way to do it unless you w

Re: [Python-Dev] Interface to change Py3kWarning in Python

2008-04-18 Thread Benjamin Peterson
On Fri, Apr 18, 2008 at 7:38 AM, Christian Heimes <[EMAIL PROTECTED]> wrote: > Benjamin Peterson schrieb: > > > > In Python we usually have to methods for the job, like > set_py3kwarningmode and get_py3kwarningmode. I don't like the enable* > and disable* style. Even the get/set methods are an u

Re: [Python-Dev] Interface to change Py3kWarning in Python

2008-04-18 Thread Christian Heimes
Benjamin Peterson schrieb: > I currently have a patch to make it possible to change py3k warnings > in Python through new functions in sys: issue 2458. I realize the > functions are rather ugly, but I don't think there is another > practical way to do it unless you want to be writing PySys_GetObjec

[Python-Dev] Interface to change Py3kWarning in Python

2008-04-17 Thread Benjamin Peterson
I currently have a patch to make it possible to change py3k warnings in Python through new functions in sys: issue 2458. I realize the functions are rather ugly, but I don't think there is another practical way to do it unless you want to be writing PySys_GetObject and checking it for NULL whenever