random.Random is absent; the folding makes it look like an arity error
Found 2026-09-20 (frankH) censusing That Space Program under NilPy.
tsp/smoke.py:60 is self.rng = random.Random(seed) and is the only wall in
that file.
Repro, three lines, and CPython prints Random:
import random
r = random.Random(7)
print(type(r).__name__)
pxx: pascal26:2: error: Nil Python: pyrandom_random takes fewer arguments than were given.
A per-instance generator is what a program uses when it wants a REPRODUCIBLE
stream that other code cannot disturb — a seeded simulation, a test fixture, a
procedural world — which is precisely why smoke.py asks for one. Mapping it
onto the global generator would be the wrong answer rather than a partial one:
every other user of random.* in the process would perturb the stream, so a
seeded run would stop being reproducible and nothing would say so.
Log
- 2026-09-21 — resolved; this names the commit that carried the resolve, which is not always the one that carried the change — commit 6c9ab5d91.