mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-133372: remove out of date todos from types module about generator wrapper (#134563)
This commit is contained in:
parent
f9324cb3cb
commit
366d95d862
1 changed files with 0 additions and 2 deletions
|
@ -250,7 +250,6 @@ class DynamicClassAttribute:
|
||||||
|
|
||||||
|
|
||||||
class _GeneratorWrapper:
|
class _GeneratorWrapper:
|
||||||
# TODO: Implement this in C.
|
|
||||||
def __init__(self, gen):
|
def __init__(self, gen):
|
||||||
self.__wrapped = gen
|
self.__wrapped = gen
|
||||||
self.__isgen = gen.__class__ is GeneratorType
|
self.__isgen = gen.__class__ is GeneratorType
|
||||||
|
@ -305,7 +304,6 @@ def coroutine(func):
|
||||||
# Check if 'func' is a generator function.
|
# Check if 'func' is a generator function.
|
||||||
# (0x20 == CO_GENERATOR)
|
# (0x20 == CO_GENERATOR)
|
||||||
if co_flags & 0x20:
|
if co_flags & 0x20:
|
||||||
# TODO: Implement this in C.
|
|
||||||
co = func.__code__
|
co = func.__code__
|
||||||
# 0x100 == CO_ITERABLE_COROUTINE
|
# 0x100 == CO_ITERABLE_COROUTINE
|
||||||
func.__code__ = co.replace(co_flags=co.co_flags | 0x100)
|
func.__code__ = co.replace(co_flags=co.co_flags | 0x100)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue