官术网_书友最值得收藏!

The queue module

The queue module in Python provides a simple implementation of the queue data structure. Each queue in the queue.Queue class can hold a specific amount of element, and can have the following methods as its high-level API:

  • get(): This method returns the next element of the calling queue object and removes it from the queue object
  • put(): This method adds a new element to the calling queue object
  • qsize(): This method returns the number of current elements in the calling queue object (that is, its size)
  • empty(): This method returns a Boolean, indicating whether the calling queue object is empty
  • full(): This method returns a Boolean, indicating whether the calling queue object is full
主站蜘蛛池模板: 黄山市| 达孜县| 会东县| 防城港市| 城市| 固阳县| 任丘市| 福鼎市| 永兴县| 石渠县| 彭阳县| 巴塘县| 明溪县| 邢台县| 荔波县| 溆浦县| 双江| 昆明市| 湄潭县| 社会| 徐汇区| 灵武市| 金湖县| 南江县| 泽库县| 大化| 贵州省| 广元市| 廉江市| 射洪县| 休宁县| 福安市| 玉屏| 旌德县| 中阳县| 禄丰县| 泗水县| 崇左市| 额济纳旗| 翼城县| 赫章县|