3 ms·
Correction, the empty iterator example should have been `assert 5 not in numbers`, or another expression that exhausts the generator. And to everyone saying th
by BoppreH 3y ago
Correction, the empty iterator example should have been `assert 5 not in numbers`, or another expression that exhausts the generator.
And to everyone saying that the behaviors are correct because of scoping rules, or iteration protocol: I know. Those are not compiler bugs, but bad design decisions. Every example here has a more intuitive behavior in another language.