This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2014年09月24日 00:51 by r.david.murray, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg227401 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2014年09月24日 00:51 | |
The get_stack method docs say: "If the coroutine is active, returns the stack where it was suspended." I presume this means something more like "if the coroutine is not done...", since in English you can't be both active *and* suspended. Or does it mean "last suspended"? Then it talks about limit and how stacks limit returns newest frames while with tracebacks it is oldest frames...but the last sentence says that for suspended coroutines only one frame is returned. So there is a definite lack of clarity here: can we get multiple frames if the coroutine is not suspended (in which case that first sentence seems likely to be the 'last suspended' interpretation), or for non-tracebacks can we only ever get one frame, in which case why talk about limit returning the newest frames for stacks? |
|||
| msg232022 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2014年12月02日 17:02 | |
New changeset 4b6b03c1f4ff by Victor Stinner in branch '3.4': Closes #22475: asyncio doc, fix Task.get_stack() doc https://hg.python.org/cpython/rev/4b6b03c1f4ff |
|||
| msg232023 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2014年12月02日 17:04 | |
I fixed the most obvious issue in the documentation. I don't know the function enough to propose a better documentation, sorry. Don't hesitate to write a patch on the documentation if you have a better explanation of how get_stack() behaves. It is correct that get_stack() only returns 1 frame if the task is suspended, whereas it returns more frames if get_stack() is called while the task is running. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:08 | admin | set | github: 66665 |
| 2014年12月02日 17:04:23 | vstinner | set | messages: + msg232023 |
| 2014年12月02日 17:02:49 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg232022 resolution: fixed stage: resolved |
| 2014年09月24日 14:28:04 | vstinner | set | components: + asyncio |
| 2014年09月24日 08:50:39 | pitrou | set | nosy:
+ gvanrossum, pitrou, vstinner, giampaolo.rodola, yselivanov |
| 2014年09月24日 00:51:49 | r.david.murray | create | |