-
- Downloads
Implement default function arguments (for Python functions).
TODO: Decide if we really need separate bytecode for creating functions with default arguments - we would need same for closures, then there're keywords arguments too. Having all combinations is a small exponential explosion, likely we need just 2 cases - simplest (no defaults, no kw), and full - defaults & kw.
Showing
- py/bc0.h 2 additions, 0 deletionspy/bc0.h
- py/compile.c 1 addition, 1 deletionpy/compile.c
- py/emitbc.c 9 additions, 3 deletionspy/emitbc.c
- py/obj.h 1 addition, 1 deletionpy/obj.h
- py/objfun.c 25 additions, 4 deletionspy/objfun.c
- py/runtime.c 3 additions, 3 deletionspy/runtime.c
- py/runtime.h 1 addition, 1 deletionpy/runtime.h
- py/showbc.c 5 additions, 0 deletionspy/showbc.c
- py/vm.c 6 additions, 1 deletionpy/vm.c
- tests/basics/fun-defargs.py 20 additions, 0 deletionstests/basics/fun-defargs.py
Loading
Please register or sign in to comment