results in ;Could not find function sum as a built-in or user-defined function. Note that user functions must be annotated with a @wp.func decorator to be called from a kernel.
This would not only be useful for sum, but also for other built-in names like abs, filter, hash or others.
Currently this also prohibits function names shadowing built-in constants like Ellipsis or NotImplemented, but this is probably a sane design choice.
I agree that the current behaviour seems wrong. Python allows shadowing builtins, so we should allow that as well in Warp. I can take a look, thanks for reporting!
Description
Would it be possible to allow shadowing python built-in functions with functions decorated by wp.func?
Context
The following code
results in
;Could not find function sum as a built-in or user-defined function. Note that user functions must be annotated with a @wp.func decorator to be called from a kernel.
This would not only be useful for sum, but also for other built-in names like abs, filter, hash or others.
Currently this also prohibits function names shadowing built-in constants like
Ellipsis
orNotImplemented
, but this is probably a sane design choice.