<bdo id='SeRz5'></bdo><ul id='SeRz5'></ul>
    1. <legend id='SeRz5'><style id='SeRz5'><dir id='SeRz5'><q id='SeRz5'></q></dir></style></legend>

      <small id='SeRz5'></small><noframes id='SeRz5'>

      1. <tfoot id='SeRz5'></tfoot>

        <i id='SeRz5'><tr id='SeRz5'><dt id='SeRz5'><q id='SeRz5'><span id='SeRz5'><b id='SeRz5'><form id='SeRz5'><ins id='SeRz5'></ins><ul id='SeRz5'></ul><sub id='SeRz5'></sub></form><legend id='SeRz5'></legend><bdo id='SeRz5'><pre id='SeRz5'><center id='SeRz5'></center></pre></bdo></b><th id='SeRz5'></th></span></q></dt></tr></i><div id='SeRz5'><tfoot id='SeRz5'></tfoot><dl id='SeRz5'><fieldset id='SeRz5'></fieldset></dl></div>
      2. 我可以从 PriorityQueue 中获取项目而不删除它吗?

        Can I get an item from a PriorityQueue without removing it yet?(我可以从 PriorityQueue 中获取项目而不删除它吗?)

        <small id='yAxJa'></small><noframes id='yAxJa'>

        <tfoot id='yAxJa'></tfoot>
              <bdo id='yAxJa'></bdo><ul id='yAxJa'></ul>
              1. <legend id='yAxJa'><style id='yAxJa'><dir id='yAxJa'><q id='yAxJa'></q></dir></style></legend>
                    <tbody id='yAxJa'></tbody>

                  <i id='yAxJa'><tr id='yAxJa'><dt id='yAxJa'><q id='yAxJa'><span id='yAxJa'><b id='yAxJa'><form id='yAxJa'><ins id='yAxJa'></ins><ul id='yAxJa'></ul><sub id='yAxJa'></sub></form><legend id='yAxJa'></legend><bdo id='yAxJa'><pre id='yAxJa'><center id='yAxJa'></center></pre></bdo></b><th id='yAxJa'></th></span></q></dt></tr></i><div id='yAxJa'><tfoot id='yAxJa'></tfoot><dl id='yAxJa'><fieldset id='yAxJa'></fieldset></dl></div>
                  本文介绍了我可以从 PriorityQueue 中获取项目而不删除它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想获取队列中的下一个项目,但我不想将其出列.Python的queue.PriorityQueue有可能吗?从 docs,我看不到怎么办呢

                  I want to get the next item in queue but I don't want to dequeue it. Is it possible in Python's queue.PriorityQueue? From the docs, I don't see how can it be done

                  推荐答案

                  根据理论,当您从队列中获取项目时,它将从队列中删除.您必须编写自己的函数,该函数将为您提供 PriorityQueue 的最后一个元素.你可以通过继承priorityqueue来创建peek函数.

                  When you get item form the queue as per theory it will remove from the queue. You have to write your own function which will give you last element of PriorityQueue. You can create a peek function by inherit the priorityqueue.

                  这篇关于我可以从 PriorityQueue 中获取项目而不删除它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding config modes to Plotly.Py offline - modebar(将配置模式添加到 Plotly.Py 离线 - 模式栏)
                  Plotly: How to style a plotly figure so that it doesn#39;t display gaps for missing dates?(Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙?)
                  python save plotly plot to local file and insert into html(python将绘图保存到本地文件并插入到html中)
                  Plotly: What color cycle does plotly express follow?(情节:情节表达遵循什么颜色循环?)
                  How to save plotly express plot into a html or static image file?(如何将情节表达图保存到 html 或静态图像文件中?)
                  Plotly: How to make a line plot from a pandas dataframe with a long or wide format?(Plotly:如何使用长格式或宽格式的 pandas 数据框制作线图?)
                    • <tfoot id='O2wz0'></tfoot>

                    • <i id='O2wz0'><tr id='O2wz0'><dt id='O2wz0'><q id='O2wz0'><span id='O2wz0'><b id='O2wz0'><form id='O2wz0'><ins id='O2wz0'></ins><ul id='O2wz0'></ul><sub id='O2wz0'></sub></form><legend id='O2wz0'></legend><bdo id='O2wz0'><pre id='O2wz0'><center id='O2wz0'></center></pre></bdo></b><th id='O2wz0'></th></span></q></dt></tr></i><div id='O2wz0'><tfoot id='O2wz0'></tfoot><dl id='O2wz0'><fieldset id='O2wz0'></fieldset></dl></div>

                      <small id='O2wz0'></small><noframes id='O2wz0'>

                        <tbody id='O2wz0'></tbody>
                      1. <legend id='O2wz0'><style id='O2wz0'><dir id='O2wz0'><q id='O2wz0'></q></dir></style></legend>

                          <bdo id='O2wz0'></bdo><ul id='O2wz0'></ul>