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/2004-May/044956.html below:

[Python-Dev] cmp(x,x)

[Python-Dev] cmp(x,x) [Python-Dev] cmp(x,x)Gustavo Niemeyer niemeyer at conectiva.com
Tue May 25 11:40:49 EDT 2004
> Going through the function, in a case where v is w and op is
> either Py_EQ or Py_NE, we have

Looking again, this is true for any operation, not only
Py_EQ or Py_NE. So the shortcut might be:

    if (v == w) {
        if (op == Py_EQ || op == Py_LE || op == Py_GE)
            res = Py_True;
        else
            res = Py_False;
         Py_INCREF(res);
         return res;
    }

-- 
Gustavo Niemeyer
http://niemeyer.net

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