This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: "cmp" still sends messages
Type: Stage:
Components: Versions: Python 3.1, Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: LambertDW, mark.dickinson
Priority: normal Keywords:

Created on 2009-12-03 19:58 by LambertDW, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg95943 - (view) Author: David W. Lambert (LambertDW) Date: 2009-12-03 19:58
'''
    RuntimeError: maximum recursion depth exceeded in cmp

    Python 3.1.1 (r311:74480, Oct  2 2009, 12:29:57) 
    [GCC 4.3.3] on linux2
'''

import itertools,pprint

combos = itertools.combinations

def connect(nodes,a,b):
    nodes[a].append(b)
    nodes[b].append(a)

def insert(nodes,components):
    if components == 0:
        pprint.pprint(nodes)
    for (i,node,) in enumerate(nodes):
        if not node:
            break
    i += 2
    for joints in combos(range(i),2):
        connect(nodes,*joints)
        nest = [node[:]for node in nodes]
        insert(nest,components-1)

def e155(components):
    if components < 1:
        return 0
    network = [[]for i in range((components+1)*2)]
    insert(network,components)
    return network

e155(2)
msg95945 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-12-03 20:41
How about "maximum recursion depth exceeded in comparison" instead?

(It's coming from PyObject_RichCompare in Objects/object.c, by the way.)
msg95958 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-12-04 10:07
Fixed in r76663, r76664.  Thanks for the report!
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51679
2009-12-04 10:07:44mark.dickinsonsetstatus: open -> closed
resolution: fixed
messages: + msg95958

versions: + Python 3.2
2009-12-03 20:41:48mark.dickinsonsetnosy: + mark.dickinson
messages: + msg95945
2009-12-03 19:58:44LambertDWcreate