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

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
主站蜘蛛池模板: 尚义县| 屏边| 宜昌市| 宜宾市| 牟定县| 微山县| 连江县| 壶关县| 云梦县| 泸水县| 陵川县| 惠州市| 三河市| 孝感市| 玉溪市| 扎赉特旗| 博白县| 淳安县| 顺平县| 桂林市| 高邑县| 达拉特旗| 龙南县| 巴南区| 竹北市| 洞头县| 宜君县| 永平县| 湖南省| 砚山县| 秦安县| 灵武市| 天津市| 宜兰县| 沙湾县| 雷山县| 荆门市| 金阳县| 乐安县| 盖州市| 伊宁县|