New submission from Марк Коренберг: >>> import heapq >>> from functools import partial >>> qwe = [(0, lambda x: 42), (0, lambda x: 56)] >>> heapq.heapify(qwe) >>> >>> qwe = [(0, partial(lambda x: 42)), (0, partial(lambda x: 56))] >>> heapq.heapify(qwe) Traceback (most recent call last): File "/usr/lib/python3.4/code.py", line 90, in runcode exec(code, self.locals) File "<input>", line 1, in <module> TypeError: unorderable types: functools.partial() < functools.partial()
So it is not realiable to use heapq if element of the array is (int, callable) ---------- components: Library (Lib) messages: 246894 nosy: mmarkk priority: normal severity: normal status: open title: Heapq + functools.partial : TypeError: unorderable types type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24660> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com