From 3647ad5ca8217a3c0c76d81b48be2a8edb448780 Mon Sep 17 00:00:00 2001 From: Valentyn Tymofieiev Date: Fri, 17 Mar 2023 18:05:42 -0700 Subject: [PATCH] Wording update. --- .../www/site/content/en/documentation/programming-guide.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/website/www/site/content/en/documentation/programming-guide.md b/website/www/site/content/en/documentation/programming-guide.md index eeda63211b6e..fc259f9cb81c 100644 --- a/website/www/site/content/en/documentation/programming-guide.md +++ b/website/www/site/content/en/documentation/programming-guide.md @@ -955,9 +955,10 @@ the actual processing logic. You don't need to manually extract the elements from the input collection; the Beam SDKs handle that for you. Your `process` method should accept an argument `element`, which is the input element, and return an iterable with its output values. You can accomplish this by emitting individual -elements with `yield` statements. You can also use a `return` statement -with an iterable, like a list or a generator. Don't mix `yield` and -`return` statements in the same `process` method - this leads to [undefined behavior](https://github.com/apache/beam/issues/22969). +elements with `yield` statements, and use `yield from` to emit all elements from +an iterable, such as a list or a generator. Using `return` statement +with an iterable is also acceptable as long as you don't mix `yield` and +`return` statements in the same `process` method, since that leads to [incorrect behavior](https://github.com/apache/beam/issues/22969). {{< /paragraph >}} {{< paragraph class="language-go">}}