'function' object has no attribute '__code__'

On the server side you have standard Python, on the client side you have Skulpt, a limited implementation of Python that lacks some magic methods, introspection, standard libraries, and other things rarely used that would needlessly bloat the Javascript library.

If you really need something, ask here in the forum. The Anvil crew are maintainers of Skulpt and they may add what you ask for. I have seen it happening a few times.

In my opinion this specific feature, the __code__ magic method, is very rarely used and will only be implemented if it’s very easy.

3 Likes