You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deftest_incrementing_with_local_counter(self):
globalcounterstart=counterself.increment_using_local_counter(start) # should be `counter` instead of `start`self.assertEqual(False, counter==start+1)
Yes, in both cases the answer is False. But logically in start we should keep initial value and then compare with modifiedcounter.
The text was updated successfully, but these errors were encountered:
Well... I'm going to make admission. I wrote this a long time ago. I have hardly any recollection of writing this koan at all. But... looking back at it with fresh eyes this compared with the next koantest_incrementing_with_global_counter is super confusing. I can see my intent was to show the difference in scope but this doesn't prove it at all well, because the tests for local vs global counters are almost identical!
So I'll throw down the gauntlet. If someone wants to make a cool contribution to Python Koans, this is a great place to start!
Hey, looks like typo in about_scope.py:73
Yes, in both cases the answer is False. But logically in
start
we should keep initial value and then compare withmodifiedcounter
.The text was updated successfully, but these errors were encountered: