There was an error while loading. Please reload this page.
1 parent d4fceaa commit ac19081Copy full SHA for ac19081
Lib/test/test_named_expressions.py
@@ -195,7 +195,7 @@ def test_named_expression_assignment_14(self):
195
Where all variables are positive integers, and a is at least as large
196
as the n'th root of x, this algorithm returns the floor of the n'th
197
root of x (and roughly doubling the number of accurate bits per
198
- iteration)::
+ iteration):
199
"""
200
a = 9
201
n = 2
@@ -206,6 +206,12 @@ def test_named_expression_assignment_14(self):
206
207
self.assertEqual(a, 1)
208
209
+ def test_named_expression_assignment_15(self):
210
+ while a := False:
211
+ pass # This will not run
212
+
213
+ self.assertEqual(a, False)
214
215
216
class NamedExpressionScopeTest(unittest.TestCase):
217
0 commit comments