[issue40387] queue example it does not work

2020-04-26 Thread Santiago Blanco


Santiago Blanco  added the comment:

I am trying to help, if you want I change something of my PR tell me what.

I think most people need concrete examples to learn anything, but I may be 
wrong.

I consider that a note will not change anything.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40387] queue example it does not work

2020-04-25 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

The example is supposed to be a sketch of the overall pattern.  IMO, putting 
concrete and useless implementations of do_work() and source() make the example 
less intelligible.

Instead, we can add a note that the user needs to supply their own do_work() 
and source().

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40387] queue example it does not work

2020-04-25 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 3.0 -> 4.0
pull_requests: +19035
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19713

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40387] queue example it does not work

2020-04-25 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

In general examples in the documentation may lack some things like imports as 
they are implicit but in this case it also lack do_work(), source() and 
num_worker_threads.

You could use os.cpu_count() instead of your hard-coded value and the comment.

Can you open a pull request with your change?

--
nosy: +remi.lapeyre

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40387] queue example it does not work

2020-04-25 Thread Santiago Blanco


New submission from Santiago Blanco :

Copy the example of the next URL:

https://docs.python.org/3/library/queue.html#queue.Queue.join

and paste into a file, then try to run it. It does not work.

I have tried a new one (attachment) that works.

--
assignee: docs@python
components: Documentation
files: example.py
messages: 367263
nosy: Santiago Blanco, docs@python
priority: normal
severity: normal
status: open
title: queue example it does not work
type: enhancement
versions: Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file49092/example.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com