Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explicitely call the __dunder__ methods instead of builtins (ie,
obj.__repr__() instead of repr(obj). This is ugly, but for some reason the cleaner way triggers MaxRecursionErrors on some big trees, which we do *not* get when calling the method directly... (And it's not an InfiniteRecursion bug, we just hit python's limit when traversing the tree, and get no trouble if we raise this limit by fooling around with sys.setrecursionlimit(n)) This occurs on the __repr__, __eq__ and __str__ methods. Note that this doesn't prevent errors if we *do* hit the maximum recursion depth, but at least we get some usable margin. Hopefully this fix is temporary, or at least we'll understand why it works soon. The bug might still be caused by something else, but i don't get why this switch would seem to fix it ?
- Loading branch information