Skip to content

Commit b986bcb

Browse files
mbyrnepr2sprytnykPierre-SassoulasDanielNoord
authored
Add yield-outside-function documentation examples (#6585)
Co-authored-by: Vladyslav Krylasov <[email protected]> Co-authored-by: Pierre Sassoulas <[email protected]> Co-authored-by: Daniël van Noord <[email protected]>
1 parent 0e7204b commit b986bcb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
for i in range(10):
2+
yield i # [yield-outside-function]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def one_to_ten():
2+
for i in range(10):
3+
yield i

0 commit comments

Comments
 (0)