Replies: 1 comment 1 reply
-
Hi @ericYH01 - we are hesitant to add any jupyter magic to marimo, as it is not valid python. We want marimo files to be able to be run as scripts and pipelines in production. As soon as you add magic, you can no longer do this. It also teaches bad practices for when writing non-notebook code. As for allowing duplicate names, this is a restriction we enforce in order to keep your notebooks reproducible - by creating a DAG (directed acyclic graph) for dependencies between cells. So allowing duplicate names would not allow marimo to provide the benefits today. What you can do is prefix the variables you want local to a cell with an underscore, e.g. |
Beta Was this translation helpful? Give feedback.
-
Description
Hi,
I am a newbie for python, and feel great about marimo. I am having an issue that I have to change variable names when I'm practicing examples from books, otherwise the error of "name is defined" shows.
Suggested solution
I'm thinking perhaps you can add some magic commands, like %reset from Jupyter. Would be much more friendly for newbies.
Alternative
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions