Lines Matching refs:yield

148 tuple may or may not yield the same object).
206 type, ``yield`` and ``yield from`` expressions are prohibited in the implicitly
229 ``yield`` and ``yield from`` deprecated in the implicitly nested scope.
376 itself, ``yield`` and ``yield from`` expressions are prohibited in the
396 ``yield`` and ``yield from`` deprecated in the implicitly nested scope.
405 keyword: yield
407 pair: yield; expression
412 yield_expression: "yield" [`expression_list` | "from" `expression`]
414 The yield expression is used when defining a :term:`generator` function
416 thus can only be used in the body of a function definition. Using a yield
422 yield 123
425 yield 123
427 Due to their side effects on the containing scope, ``yield`` expressions
444 time, the execution proceeds to the first yield expression, where it is
450 generator's methods, the function can proceed exactly as if the yield expression
451 were just another external call. The value of the yield expression after
460 All of this makes generator functions quite similar to coroutines; they yield
473 single: from; yield from expression
475 When ``yield from <expr>`` is used, it treats the supplied expression as
486 the yield expression. It can be either set explicitly when raising
491 Added ``yield from <expr>`` to delegate control flow to a subiterator.
493 The parentheses may be omitted when the yield expression is the sole expression
499 The proposal for adding generators and the :keyword:`yield` statement to Python.
531 executed yield expression. When a generator function is resumed with a
532 :meth:`~generator.__next__` method, the current yield expression always
533 evaluates to :const:`None`. The execution then continues to the next yield
546 *value* argument becomes the result of the current yield expression. The
550 with :const:`None` as the argument, because there is no yield expression that
575 .. index:: single: yield; examples
588 ... value = (yield value)
607 For examples using ``yield from``, see :ref:`pep-380` in "What's New in
615 The presence of a yield expression in a function or method defined using
628 is awaited on. At that time, the execution proceeds to the first yield
635 generator's methods, the function can proceed exactly as if the yield
636 expression were just another external call. The value of the yield expression
642 In an asynchronous generator function, yield expressions are allowed anywhere
645 being garbage collected), then a yield expression within a :keyword:`!try`
662 The expression ``yield from <expr>`` is a syntax error when used in an
680 generator or resumes it at the last executed yield expression. When an
682 method, the current yield expression always evaluates to :const:`None` in
683 the returned awaitable, which when run will continue to the next yield
684 expression. The value of the :token:`expression_list` of the yield
699 and the *value* argument becomes the result of the current yield expression.
706 because there is no yield expression that could receive the value.
778 same attribute reference may yield different objects.
1216 The ``/`` (division) and ``//`` (floor division) operators yield the quotient of
1356 Comparisons yield boolean values: ``True`` or ``False``.