Skip to content

Commit 86fe70e

Browse files
committed
make punctuation consistent between generator examples
1 parent 8a50f5c commit 86fe70e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

peps/pep-0798.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,15 +1045,15 @@ Generator Cleanup with ``.close()``
10451045
finally:
10461046
print("outer generator received GeneratorExit")
10471047
1048-
# With yield from - GeneratorExit is passed through to sub-generator
1048+
# With yield from, GeneratorExit is passed through to sub-generator
10491049
gen1 = yield_from()
10501050
print(next(gen1)) # prints "first"
10511051
gen1.close() # closes sub-generator and then outer generator
10521052
1053-
# With explicit loop - GeneratorExit goes to outer generator first
1053+
# With explicit loop, GeneratorExit goes to outer generator only
10541054
gen2 = explicit_loop()
10551055
print(next(gen2)) # prints "first"
1056-
gen2.close() #only closes outer generator
1056+
gen2.close() # only closes outer generator
10571057
10581058
print('program finished; GC will close the explicit loop subgenerator')
10591059
# second inner generator closes when GC closes it at the end

0 commit comments

Comments
 (0)