diff options
Diffstat (limited to 'doc/data/messages/r/return-arg-in-generator/good.py')
-rw-r--r-- | doc/data/messages/r/return-arg-in-generator/good.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/data/messages/r/return-arg-in-generator/good.py b/doc/data/messages/r/return-arg-in-generator/good.py index c40beb573..72dc95e7b 100644 --- a/doc/data/messages/r/return-arg-in-generator/good.py +++ b/doc/data/messages/r/return-arg-in-generator/good.py @@ -1 +1,4 @@ -# This is a placeholder for correct code for this message. +def yield_numbers(): + for number in range(10): + yield number + return "I am now allowed!" # This was not allowed in Python 3.3 and earlier. |