mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-46409: Make generators in bytecode (GH-30633)
* Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing.
This commit is contained in:
parent
d05a66339b
commit
b04dfbbe4b
18 changed files with 236 additions and 205 deletions
|
@ -897,7 +897,7 @@ From the Iterators list, about the types of these things.
|
|||
>>> type(i)
|
||||
<class 'generator'>
|
||||
>>> [s for s in dir(i) if not s.startswith('_')]
|
||||
['close', 'gi_code', 'gi_frame', 'gi_running', 'gi_yieldfrom', 'send', 'throw']
|
||||
['close', 'gi_code', 'gi_frame', 'gi_running', 'gi_suspended', 'gi_yieldfrom', 'send', 'throw']
|
||||
>>> from test.support import HAVE_DOCSTRINGS
|
||||
>>> print(i.__next__.__doc__ if HAVE_DOCSTRINGS else 'Implement next(self).')
|
||||
Implement next(self).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue