I have found some evidence that my hunch was correct: In
def find_other_set (possible_sets, other_item, limit, dmin):
# Is there a set I can move other_item into?
for other_set in possible_sets:
if len(other_set) < limit and all (ok_to_add (c, other_item, dmin)
for c in other_set):
return other_set, other_item
return None, None
It appears that the 'other_set' returned by python is the actual object
that was part of the input list, while the value returned by pythran is not
the original object but a copy. I don't have proof, but it I have good
evidence.