Skip to content

Commit 2129c7a

Browse files
committed
Replace "consistent with" with "analogous to"
1 parent 43d9a7b commit 2129c7a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Lib/test/test_async_yield_from.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ async def outer():
11691169
g = outer()
11701170
self.assertIs(await anext(g), yielded_first)
11711171
raised = GeneratorExit()
1172-
# GeneratorExit is suppressed. This is consistent with PEP 342:
1172+
# GeneratorExit is suppressed. This is analogous to PEP 342:
11731173
# https://peps.python.org/pep-0342/#new-generator-method-close
11741174
await g.aclose()
11751175
await self.assert_stop_iteration(g)
@@ -1182,7 +1182,7 @@ async def outer():
11821182
with self.assertRaises(GeneratorExit) as caught:
11831183
await g.athrow(thrown)
11841184
# The raised GeneratorExit is suppressed, but the thrown one
1185-
# propagates. This is consistent with PEP 380:
1185+
# propagates. This is analogous to PEP 380:
11861186
# https://peps.python.org/pep-0380/#proposal
11871187
self.assertIs(caught.exception, thrown)
11881188
self.assertIsNone(caught.exception.__context__)
@@ -1486,7 +1486,7 @@ async def outer():
14861486
with self.subTest("close"):
14871487
g = outer()
14881488
self.assertIs(await anext(g), yielded_first)
1489-
# No chaining happens. This is consistent with PEP 342:
1489+
# No chaining happens. This is analogous to PEP 342:
14901490
# https://peps.python.org/pep-0342/#new-generator-method-close
14911491
with self.assert_generator_ignored_generator_exit() as caught:
14921492
await g.aclose()
@@ -1497,7 +1497,7 @@ async def outer():
14971497
g = outer()
14981498
self.assertIs(await anext(g), yielded_first)
14991499
thrown = GeneratorExit()
1500-
# No chaining happens. This is consistent with PEP 342:
1500+
# No chaining happens. This is analogous to PEP 342:
15011501
# https://peps.python.org/pep-0342/#new-generator-method-close
15021502
with self.assert_generator_ignored_generator_exit() as caught:
15031503
await g.athrow(thrown)
@@ -1558,7 +1558,7 @@ async def outer():
15581558
with self.subTest("close"):
15591559
g = outer()
15601560
self.assertIs(await anext(g), yielded_first)
1561-
# StopAsyncIteration is suppressed. This is consistent with PEP 342:
1561+
# StopAsyncIteration is suppressed. This is analogous to PEP 342:
15621562
# https://peps.python.org/pep-0342/#new-generator-method-close
15631563
await g.aclose()
15641564
await self.assert_stop_iteration(g)
@@ -1567,7 +1567,7 @@ async def outer():
15671567
g = outer()
15681568
self.assertIs(await anext(g), yielded_first)
15691569
thrown = GeneratorExit()
1570-
# StopAsyncIteration is suppressed. This is consistent with PEP 342:
1570+
# StopAsyncIteration is suppressed. This is analogous to PEP 342:
15711571
# https://peps.python.org/pep-0342/#new-generator-method-close
15721572
with self.assertRaises(GeneratorExit) as caught:
15731573
await g.athrow(thrown)

0 commit comments

Comments
 (0)