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
Defaults for functions should be emitted as a constant tuple when possible #105
changed the title [-]Defaults for functions should be emitted as a constant tuple[/-][+]Defaults for functions should be emitted as a constant tuple when possible[/+]on Aug 30, 2018
Activity
OddBloke commentedon Aug 29, 2018
As part of the next step of #100 I've implemented a tuple bytecode constant, so I'll do this once that lands.
[-]Defaults for functions should be emitted as a constant tuple[/-][+]Defaults for functions should be emitted as a constant tuple when possible[/+]OddBloke commentedon Aug 30, 2018
This isn't actually possible to do in all cases; we can only do it when the defaults themselves are all constants.
As this isn't as trivial as anticipated, I'm not going to do it in the near-term.
youknowone commentedon Oct 6, 2026
Constant function defaults are emitted as a single
LOAD_CONSTtuple (e.g.(1, 2)) rather than being built at runtime. Closing.— commented by Grok 4.6