ztawil
ztawil8mo ago

marimo | a next-generation Python notebo...

https://marimo.app/l/dhp4fm Not sure if this is known, but creating a "private function" throws an error when trying to use it
marimo | a next-generation Python notebook
Explore data and build apps seamlessly with marimo, a next-generation Python notebook.
5 Replies
ztawil
ztawilOP8mo ago
No description
Myles Scolnick
Myles Scolnick8mo ago
This is actually a feature. Private functions and variables are scoped to just the cell
ztawil
ztawilOP8mo ago
K, thanks--that's good to know. I'll start using that because I've found when I do:
with open(<filename>) as f:
data = f.read()
with open(<filename>) as f:
data = f.read()
I can't do it in future cells which is really annoying. I'll use _f
Myles Scolnick
Myles Scolnick8mo ago
Yea that’s also a python nuance which I hit myself unknowingly. It’s also the same for for-loops. Python leaks the variable