MCPcopy Create free account
hub / github.com/EasyIME/PIME / _value_from_stopiteration

Function _value_from_stopiteration

python/python3/tornado/gen.py:131–143  ·  view source on GitHub ↗
(e: Union[StopIteration, "Return"])

Source from the content-addressed store, hash-verified

129
130
131def _value_from_stopiteration(e: Union[StopIteration, "Return"]) -> Any:
132 try:
133 # StopIteration has a value attribute beginning in py33.
134 # So does our Return class.
135 return e.value
136 except AttributeError:
137 pass
138 try:
139 # Cython backports coroutine functionality by putting the value in
140 # e.args[0].
141 return e.args[0]
142 except (AttributeError, IndexError):
143 return None
144
145
146def _create_future() -> Future:

Callers 2

wrapperFunction · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected