comparison planemo/lib/python3.7/site-packages/urllib3/util/queue.py @ 1:56ad4e20f292 draft

"planemo upload commit 6eee67778febed82ddd413c3ca40b3183a3898f1"
author guerler
date Fri, 31 Jul 2020 00:32:28 -0400
parents
children
comparison
equal deleted inserted replaced
0:d30785e31577 1:56ad4e20f292
1 import collections
2 from ..packages import six
3 from ..packages.six.moves import queue
4
5 if six.PY2:
6 # Queue is imported for side effects on MS Windows. See issue #229.
7 import Queue as _unused_module_Queue # noqa: F401
8
9
10 class LifoQueue(queue.Queue):
11 def _init(self, _):
12 self.queue = collections.deque()
13
14 def _qsize(self, len=len):
15 return len(self.queue)
16
17 def _put(self, item):
18 self.queue.append(item)
19
20 def _get(self):
21 return self.queue.pop()