A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/090412.html below:

PyArg_Parse weirds

PyArg_Parse weirds PyArg_Parse weirdsJust van Rossum just at letterror.com
Tue Apr 24 12:43:00 EDT 2001
Robin Becker wrote:

> OK I figured out that PyArg_Parse seems to know about an existing error so I needed to
> clear the existing error condition with PyErr_Clear ie
> 
>         else if(PyObject_HasAttrString(value,"red")
>                         && PyObject_HasAttrString(value,"green")
>                         && PyObject_HasAttrString(value,"blue")){
>                 double  r, g, b;
>                 PyObject *v;
>                 PyErr_Clear();  /*needed this here else i==0 in pyArg_Parse call*/
>                 v = PyObject_GetAttrString(value,"red");
>                 i = PyArg_Parse(v,"d",&r);

Wouldn't it make sense to figure out where the original exception is raised, and
clear it there? Now it looks like you're possibly masking a real error.

Just

More information about the Python-list 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