@@ -145,14 +145,6 @@ def put(self, item, block=True, timeout=None):
145
145
self .unfinished_tasks += 1
146
146
self .not_empty .notify ()
147
147
148
- def put_nowait (self , item ):
149
- """Put an item into the queue without blocking.
150
-
151
- Only enqueue the item if a free slot is immediately available.
152
- Otherwise raise the Full exception.
153
- """
154
- return self .put (item , False )
155
-
156
148
def get (self , block = True , timeout = None ):
157
149
"""Remove and return an item from the queue.
158
150
@@ -184,13 +176,21 @@ def get(self, block=True, timeout=None):
184
176
self .not_full .notify ()
185
177
return item
186
178
179
+ def put_nowait (self , item ):
180
+ """Put an item into the queue without blocking.
181
+
182
+ Only enqueue the item if a free slot is immediately available.
183
+ Otherwise raise the Full exception.
184
+ """
185
+ return self .put (item , block = False )
186
+
187
187
def get_nowait (self ):
188
188
"""Remove and return an item from the queue without blocking.
189
189
190
190
Only get an item if one is immediately available. Otherwise
191
191
raise the Empty exception.
192
192
"""
193
- return self .get (False )
193
+ return self .get (block = False )
194
194
195
195
# Override these methods to implement other queue organizations
196
196
# (e.g. stack or priority queue).
0 commit comments