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
{{ message }}
Repository navigation
Make length keyword-only on the keyword routes (SEP 51 follow-up) #857
SEP 51 §5.1 makes length optional and keyword-only on prop_/from_gnlse, prop_/from_capillary and prop_/from_waveguide. The implementation (#851) makes it optional but keeps it positional-or-keyword, a deviation recorded in the SEP's Part II and pending a decision by the maintainer:
Cost. About 509 calls in 227 hand-written files pass length positionally, in tests, galleries, guide pages, native/tests, benchmarks and the README. 43 gallery scripts would need regenerating.
Slot hazard. With length keyword-only, the next positional parameter takes its slot: betas on the GNLSE routes, gas on the capillary and waveguide routes. from_capillary(r, 0.2, "Ar") would then bind 0.2 to gas instead of failing with Python's own error. To guarantee a failure, those parameters would have to be keyword-only as well.
Options: (a) keyword-only as SEP 51 states, with a codemod and the galleries regenerated; (b) also make betas and gas keyword-only; (c) keep length positional-or-keyword.
Activity
docs: SEP 51 is Final
jtravs commentedon Nov 16, 2026
Settled by the maintainer:
lengthstays positional-or-keyword on the keyword routes. SEP 51 records this as an accepted deviation (Q8), in #851.docs: SEP 51 is Final