Make `ArrayValue` not callable
enhancement
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`:
<img width="534" height="73" alt="Image" src="https://github.com/user-attachments/assets/c816921d-7b7d-4087-baff-a833efcb7686" />
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__()`.
0 条评论