Issue 18432: sched modules queue property should return a list, not an iterator (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/62632
classification
Title: |
sched modules queue property should return a list, not an iterator |
|
|
Type: |
behavior |
Stage: |
patch review |
Components: |
Library (Lib) |
Versions: |
Python 3.3, Python 3.4 |
process
Created on 2013-07-12 07:31 by rhettinger, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Files |
|
|
|
File name |
Uploaded |
Description |
Edit |
sched.diff |
rhettinger,2013-07-12 07:31 |
Fix sched.queue |
review |
Messages (5) |
|
|
msg192927 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
Date: 2013-07-12 07:31 |
In Python 2, the queue attribute was a list and it is still documented that way in Python 3: http://docs.python.org/3/library/sched.html#sched.scheduler.queue This appears to be a mistake made during the 2-to-3 conversion. |
|
|
msg192932 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-07-12 08:00 |
Perhaps it will be better document it as an iterator? In any case we can call list() to get a list. |
|
|
msg192986 - (view) |
Author: Raymond Hettinger (rhettinger) *  |
Date: 2013-07-13 01:01 |
It's pretty weird to use a property for an iterator. It we really wanted iteration, the appropriate method would be __iter__. |
|
|
msg193027 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2013-07-14 05:49 |
New changeset 359002d4370d by Raymond Hettinger in branch '3.3': Issue #18432: Fix unintended API change in the sched module http://hg.python.org/cpython/rev/359002d4370d |
|
|
msg193040 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-07-14 08:42 |
Thank you for explanation. |
|
|
History |
|
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:47 |
admin |
set |
github: 62632 |
2013-07-14 08:42:40 |
serhiy.storchaka |
set |
messages: + |
2013-07-14 05:49:59 |
rhettinger |
set |
status: open -> closedresolution: fixed |
2013-07-14 05:49:25 |
python-dev |
set |
nosy: + python-devmessages: + |
2013-07-13 01:01:47 |
rhettinger |
set |
messages: + |
2013-07-12 08:00:31 |
serhiy.storchaka |
set |
nosy: + serhiy.storchaka, giampaolo.rodolamessages: + |
2013-07-12 07:31:21 |
rhettinger |
create |
|