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.

Author giampaolo.rodola
Recipients giampaolo.rodola
Date 2008-09-19.13:47:28
SpamBayes Score 1.7241684e-05
Marked as misclassified No
Message-id <1221832051.64.0.219061878163.issue3908@psf.upfronthosting.co.za>
In-reply-to
Content
import heapq

class foo:
    def __init__(self):
        self.timeout = 0
    def __le__(self, other):
        return self.timeout <= other.timeout

heap = []
heapq.heappush(heap, foo())
heapq.heappush(heap, foo())


This code on Python 2.x works without problems, by using Python3.0-RC1
it raises the following exception:


    heapq.heappush(heap, foo())
TypeError: unorderable types: foo() < foo()


Note that the previous 3.0 beta didn't have such problem.
History
Date User Action Args
2008-09-19 13:47:31giampaolo.rodolasetrecipients: + giampaolo.rodola
2008-09-19 13:47:31giampaolo.rodolasetmessageid: <1221832051.64.0.219061878163.issue3908@psf.upfronthosting.co.za>
2008-09-19 13:47:30giampaolo.rodolalinkissue3908 messages
2008-09-19 13:47:28giampaolo.rodolacreate