← board

Measured 2026-10-03 (frankuser)

# gm.py
def g(a, b=None):
    yield a
    yield b
# main
import gm
print(list(gm.g(1)))          # pxx at pin v452: no overload of g matches
x = gm.g(5); print(next(x))   # (assignment position, same failure)

and

from itertools import count as _count
c = _count(1); print(next(c))  # segfault once count became a real generator

The alias desugars to _count = count, a variable holding the step routine's address, so the call passed the user's argument where the instance belongs.

Fix

Test: test/test_nilpy_mimic_itertools.npy (both import spellings) and test/test_nilpy_classvar_counter.npy (from itertools import count as _count).