- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
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.
| Author | Mark.Shannon |
|---|---|
| Recipients | Mark.Shannon |
| Date | 2020-06-10.13:33:11 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> |
| In-reply-to |
| Content |
|---|
Generators have a "gi_running" attribute (coroutines have an equivalent cr_running flag). Internally frame also has an executing flag. We use these, plus the test `f_stacktop pointer == NULL`, to determine what state a generator or frame is in. It would be much cleaner to maintain a single f_state field in the frame to track the state of a frame, reducing the change of ambiguity and error. The possible states of a frame are: CREATED -- Frame exists but has not been executed at all SUSPENDED -- Frame has been executed, and has been suspended by a yield EXECUTING -- Frame is being executed RETURNED -- Frame has completed by a RETURN_VALUE instruction RAISED -- Frame has completed as a result of an exception being raised CLEARED -- Frame has been cleared, either by explicit call to clear or by the GC. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2020-06-10 13:33:12 | Mark.Shannon | set | recipients: + Mark.Shannon |
| 2020-06-10 13:33:12 | Mark.Shannon | set | messageid: <1591795992.13.0.468529987519.issue40941@roundup.psfhosted.org> |
| 2020-06-10 13:33:12 | Mark.Shannon | link | issue40941 messages |
| 2020-06-10 13:33:11 | Mark.Shannon | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements
