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/2001-May/014783.html below:

[Python-Dev] Comparison speed

[Python-Dev] Comparison speed [Python-Dev] Comparison speedMartin v. Loewis martin@loewis.home.cs.tu-berlin.de
Tue, 15 May 2001 00:06:57 +0200
> Anybody care to take a stab at making the new richcmp and/or coerce
> code ugly again?

When stepping through the code, I also missed support for the
relationship between identity and equality. E.g. in
PyObject_RichCompare, I'd expect

  if (v == w) {
     switch (op)
     case Py_EQ:case Py_LE:case Py_GE:
        Py_INCREF(Py_True);
        return Py_True;
     case Py_NE:case Py_LT:case Py_GT:
        Py_INCREF(Py_False);
        return Py_False;
     }
  }

That would not help in your case, of course. I don't even know how
frequent comparing identical objects is in real life - but this is
something that PyObject_Compare has that PyObject_RichCompare
currently doesn't.

Regards,
Martin




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