← board

bin()/oct() missing; enumerate(xs, start) had no offset form

Found by proactive CPython-diff sweeping. hex(n) existed but its siblings bin(n)/oct(n) did not (undefined variable). enumerate(xs) as a value existed but only ever counted from 0 — CPython's enumerate(xs, start) / enumerate(xs, start=N) offset form was unimplemented (parse error: the for-header-only special case in compiler/pyparser.inc and the value-form special case in compiler/parser.inc both only accepted one argument).

Fix

While writing pyenumerate2, found pair.append(start + i) (a const Variant param on TPyList.append) failed to parse OUTSIDE NilPy source — filed separately as bug-a-const-variant-arg-expression-fails-outside-pyexprmode (a real, general parser gap, not touched here — worked around locally with a local variable).

Regression test test/test_nilpy_bin_oct_enumerate_start.npy (gated in test-nilpy), diffed directly against CPython's own output. Self-host confirmed byte-identical via make pxx-debug.

Log