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

[Python-Dev] Re: tp_clear return value

[Python-Dev] Re: tp_clear return value [Python-Dev] Re: tp_clear return valueNeil Schemenauer nas@python.ca
Wed, 9 Apr 2003 14:41:04 -0700
"Martin v. L?wis" wrote:
> Neil Schemenauer wrote:
> >In retrospect, I think both tp_traverse and tp_clear should have
> >returned "void".  
> 
> While this is true for tp_clear, tp_traverse is actually more general.
> gc.get_referrers uses tp_traverse, for something other than collection.

Could the visit procedure keep track of errors?  Something like:

    struct result {
        int error; /* true if an error occured while traversing */
        /* other results */
    }

    static void
    myvisit(PyObject* obj, struct result *r)
    {
        if (!r->error) {
            <do stuff, set r->error of error occurs>
        }
    }




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