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
Some Python libraries can accept either a function or array, and distinguish between the two with isinstance(x, typing.Callable). Unfortunately this is always the case for ArrayValue:
Which means that libraries may try to treat the array as a function. Would it be possible to fix that? I'd guess that ArrayValue would need to stop inheriting from AnyValue, which defines __call__().
Unfortunately that would be a breaking change, because it's documented to inherit from AnyValue.
However I think this is fixed on the v1 branch. AFAIR Jl (what was AnyValue) and JlArray (what was ArrayValue) now both inherit from JlBase, which has very little functionality, and only Jl has __call__.
Activity
cjdoris commentedon Dec 1, 2025
Unfortunately that would be a breaking change, because it's documented to inherit from
AnyValue.However I think this is fixed on the v1 branch. AFAIR
Jl(what wasAnyValue) andJlArray(what wasArrayValue) now both inherit fromJlBase, which has very little functionality, and onlyJlhas__call__.Please try it out and report back.
JamesWrigley commentedon Dec 3, 2025
Thanks, indeed it's fixed on v1. Unfortunately v1 somehow breaks the real example, but that's probably a different issue :)