Queue module and Python Documentation Rant
Bart Nessux
bart_nessux at hotmail.com
Thu Jun 17 16:39:08 EDT 2004
How can one view the contents of a queue? I'd like to verify that the
queue has the same number of objects as the list that has been put into
it. Also, should one think of a queue as static or dynamic (on the put
side)? Do you put stuff in it once and then get from it until it's empty
or do you put stuff in it a bit at a time? Or, can you do both? Also,
does the queue actually get smaller as the threads feed from it or does
it stay the same size and remember what stuff has been gotten from it
already? Is this an appropriate way to create a queue of 100,000 items?
url_queue = Queue.Queue(0)
for url in urls:
url_queue.put(url)
<rant>
I ask all of these questions because I find the Python documentation
lacking, to say the least. Python is a most excellent language, but the
docs are horrible! IMO, one can learn more about less sane languages
such as Perl and PHP simply because their documentation is so well
done... PHP especially. Don't get me wrong, I love Python, just hate
it's documentation. For a lang that prides itself on ease of use and
newbie-friendliness, Python should be ashamed of its module documentation
</rant>
Bart
More information about the Python-list
mailing list