A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-January/032245.html below:

[Python-Dev] very slow compare of recursive objects

[Python-Dev] very slow compare of recursive objects [Python-Dev] very slow compare of recursive objectsTim Peters tim.one@comcast.net
Sun, 19 Jan 2003 20:09:14 -0500
Speaking of graceful approaches, I expect that this code:

		(v->ob_type->tp_as_mapping
		 || (v->ob_type->tp_as_sequence
		     && !PyString_Check(v)
		     && !PyTuple_Check(v)))) {

no longer does what it intended to do for tuples.  Tuples can't be
recursive, so it intended to exempt tuples from the recursive-compare
machinery.  But Michael Hudson added a non-NULL tp_as_mapping slot to tuples
in rev 2.65 of tupleobject.c, so tuples are no longer exempted by the
recursive-compare gimmick.  That makes the problem in 2.3 worse than it used
to be (although it's never been zippy, due to clearing inprogress dict
entries while they're still potentially useful).  So all the hacks I added
(in my ugly patch) to keep check_recursion's tuple operations out of this
code would be better done by restoring the "don't look at tuples at all"
intent of the code above.




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