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 Zahash Z
Recipients Windson Yang, Zahash Z, matrixise, remi.lapeyre, rhettinger, serhiy.storchaka
Date 2019-02-20.16:52:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAFDy51mxiAKKdBntqJFv5XNuthkkMzj_pVQz-zu6MzAEca0OYw@mail.gmail.com>
In-reply-to <1550681221.93.0.846652702776.issue36049@roundup.psfhosted.org>
Content
If you look at the queue.PriorityQueue class, there is self.queue = [ ].

That's because priority queue uses list data structure to implement the min
heap data structure (on which priority queue is based on).

So the list can be represented.
There is no need to remove anything.

On Wed, 20 Feb 2019, 10:17 pm Serhiy Storchaka, <report@bugs.python.org>
wrote:

>
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
>
> I guess you hurried to write the code. It has not yet been decided whether
> to expose the content of the queue in its repr at all. There is no public
> API for accessing the content of the queue without removing items from the
> queue, and I think it is intentional.
>
> What is your use case? Why you need to change the repr of queues?
>
> ----------
> nosy: +serhiy.storchaka
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue36049>
> _______________________________________
>
History
Date User Action Args
2019-02-20 16:52:38Zahash Zsetrecipients: + Zahash Z, rhettinger, serhiy.storchaka, matrixise, Windson Yang, remi.lapeyre
2019-02-20 16:52:38Zahash Zlinkissue36049 messages
2019-02-20 16:52:38Zahash Zcreate