use functools wrapper for cells #5446
buckley-w-david
started this conversation in
Ideas
Replies: 1 comment
-
general but we do have the decorator Feel free to tag me on discussions re-fileformat and caching! My wheel-house at the moment |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any reason to avoid making use of the functionality in
functools
when initializing cells so that when inspected they look like the original functions?It would look something like this
marimo/marimo/_ast/app.py
Lines 336 to 344 in a26bf76
This would allow any module that imported the functions defined in a notebook to operate on them a little more normally. Things like access the docstring (via
__doc__
) or inspecting the function signature (usinginspect.signature
) would work just like any other function.I would have just submitted the above as a PR, but if marimo itself is relying on the cells to look like cells when inspected in the above ways then this could break things, and I don't have enough familiarity in the project to know one way or the other.
Beta Was this translation helpful? Give feedback.
All reactions