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 rajathagasthya
Recipients rajathagasthya, rhettinger, stutzbach, tim.peters
Date 2017-08-13.19:04:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502651098.79.0.879510010132.issue31186@psf.upfronthosting.co.za>
In-reply-to
Content
> The only hacks around that I could think of required a more complex kind of heap; e.g., restricting heap items to objects usable as dict keys, using a hidden dict to map heap items to their current index, and fiddling all the heap operations to keep that dict up to date.

Actually, this is *exactly* how I ended up thinking about this feature. I was using a separate dict to track the index at which objects are inserted in a heap, using the index to make updates to heap directly, and fixing the heap by calling heapify() every time which was slightly costly. Maybe I chose the wrong data structure for the problem, but constant time getMin() operation was crucial for me. And I didn't really care if inserts (or updates) were costlier. 

But I completely agree that it's a niche use case and I understand if we don't want to support this :)
History
Date User Action Args
2017-08-13 19:04:58rajathagasthyasetrecipients: + rajathagasthya, tim.peters, rhettinger, stutzbach
2017-08-13 19:04:58rajathagasthyasetmessageid: <1502651098.79.0.879510010132.issue31186@psf.upfronthosting.co.za>
2017-08-13 19:04:58rajathagasthyalinkissue31186 messages
2017-08-13 19:04:58rajathagasthyacreate