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/2011-February/108000.html below:

[Python-Dev] API bloat

[Python-Dev] API bloat [Python-Dev] API bloatVictor Stinner victor.stinner at haypocalc.com
Thu Feb 10 22:57:39 CET 2011
Le jeudi 10 février 2011 à 17:25 +0000, Mark Shannon a écrit :
> What about this one then,
> 
> PyFrame_GetLineNumber was added because people were using 
> PyCode_Addr2Line to get the current line number.
> 
> The API will contain then both
> PyFrame_GetLineNumber *and* PyCode_Addr2Line.
> The API then has even more redundancy.
> 
> PyObject_GetAttrString(frame, "f_lineno") should do the job.

Not exactly:

int
PyFrame_GetLineNumber(PyFrameObject *f)
{
    if (f->f_trace)
        return f->f_lineno;
    else
        return PyCode_Addr2Line(f->f_code, f->f_lasti);
}

Victor

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