@@ -97,6 +97,8 @@ _queue_SimpleQueue___init___impl(simplequeueobject *self)
97
97
return 0 ;
98
98
}
99
99
100
+ /* XXX should we support dummy "block" and "timeout" args for compatibility? */
101
+
100
102
/*[clinic input]
101
103
_queue.SimpleQueue.put
102
104
item: object
@@ -161,7 +163,15 @@ _queue.SimpleQueue.get
161
163
block: bool = True
162
164
timeout: object = None
163
165
164
- XXX
166
+ Remove and return an item from the queue.
167
+
168
+ If optional args 'block' is true and 'timeout' is None (the default),
169
+ block if necessary until an item is available. If 'timeout' is
170
+ a non-negative number, it blocks at most 'timeout' seconds and raises
171
+ the Empty exception if no item was available within that time.
172
+ Otherwise ('block' is false), return an item if one is immediately
173
+ available, else raise the Empty exception ('timeout' is ignored
174
+ in that case).
165
175
166
176
[clinic start generated code]*/
167
177
@@ -278,7 +288,7 @@ _queue_SimpleQueue_get_impl(simplequeueobject *self, int block,
278
288
static PyMethodDef simplequeue_methods [] = {
279
289
_QUEUE_SIMPLEQUEUE_GET_METHODDEF
280
290
_QUEUE_SIMPLEQUEUE_PUT_METHODDEF
281
- /* XXX implement __sizeof__ */
291
+ /* XXX implement __sizeof__, empty and qsize? */
282
292
{NULL , NULL } /* sentinel */
283
293
};
284
294
@@ -330,9 +340,8 @@ PyTypeObject PySimpleQueueType = {
330
340
/* Initialization function */
331
341
332
342
PyDoc_STRVAR (queue_module_doc ,
333
- "XXX \n\
334
- This module provides primitive operations to write multi-threaded programs.\n\
335
- The 'threading' module provides a more convenient interface." );
343
+ "C implementation of the Python queue module.\n\
344
+ This module is an implementation detail, please do not use it directly." );
336
345
337
346
static struct PyModuleDef queuemodule = {
338
347
PyModuleDef_HEAD_INIT ,
0 commit comments