IPython should display things unsorted if it can't sort them #417

Closed
apatil opened this Issue May 5, 2011 · 3 comments

Projects

None yet

2 participants

@apatil
apatil commented May 5, 2011

Hi all,

We're having issues when displaying lists of PyMC variables in IPython, pymc-devs/pymc#32 . A simple way to reproduce the problem is as follows. First, define a class with an lt method that can fail:

class test(tuple):
    def __lt__(self, other):
        if len(self) != len(other):
            raise ValueError
        else:
            return self[0] < other[0]


A = test([1,2,3])
B = test([4,5])

Then, try displaying {A: [], B: []} from IPython.

Thanks,
Anand

@takluyver
Member

It works properly in the development version, but not in 0.10. Since we're hoping to release 0.11 in the next few weeks, it probably won't get fixed in the 0.10 series unless you want to make a pull request for it.

@apatil
apatil commented May 5, 2011

Thanks... this isn't a critical problem, I'm happy to wait.

@takluyver
Member

OK, excellent. I'm going to close this issue, then.

@takluyver takluyver closed this May 5, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment