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 | exarkun |
|---|---|
| Recipients | exarkun, rhettinger, therve |
| Date | 2008年06月06日.19:28:42 |
| SpamBayes Score | 0.089407094 |
| Marked as misclassified | No |
| Message-id | <1212780526.64.0.499150470932.issue3051@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
The heapq documentation isn't very clear about its requirements. It does explicitly say that "Heaps are arrays for which heap[k] <= heap[2*k+1] and heap[k] <= heap[2*k+2] for all k, counting elements from zero." (this in the module reference for the heapq module, both in the Python 2.5 version and the in-development version) which might lead one to believe that <= (__le__) is the important operation. I don't know where it is documented that heapq behaves the same as sort(). I think the documentation needs some improvement to avoid this kind of confusion. It's very hard, often impossible, to know what is an "accidental and erroneous implementation detail" and what is a stable, public API. Also, I'm not sure why the code is being changed to accomodate newly written applications which never could have worked, breaking existing applications which did work, but I suppose that's just the decision CPython developers want to make. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年06月06日 19:28:53 | exarkun | set | spambayes_score: 0.0894071 -> 0.089407094 recipients: + exarkun, rhettinger, therve |
| 2008年06月06日 19:28:48 | exarkun | set | spambayes_score: 0.0894071 -> 0.0894071 messageid: <1212780526.64.0.499150470932.issue3051@psf.upfronthosting.co.za> |
| 2008年06月06日 19:28:45 | exarkun | link | issue3051 messages |
| 2008年06月06日 19:28:43 | exarkun | create | |