Support nested objects/recursion in `mo.inspect`
Maintainers usually reply within 1 day
@kirangadhave is already working on this.
Since Oct 2, 2026.
Assessment
This issue has not been assessed yet.
Description
Description
mo.inspect is one of my favourite underrated marimo features. However, quite often I'm dealing with lists of objects, for which inspect just prints the default representation for each child. It'd be great to be able to expand nested objects to view their details in the same way.
Simple example code:
class Point:
def __init__(self, x: float, y: float):
self.x = x
self.y = y
class Line:
def __init__(self, p1: Point, p2: Point):
self.p1 = p1
self.p2 = p2
@property
def length(self) -> float:
return ((self.p2.x - self.p1.x) ** 2 + (self.p2.y - self.p1.y) ** 2) ** 0.5
lines = [Line(Point(0, 0), Point(i, i)) for i in range(5)]
mo.inspect(lines)
Current marimo output:
For reference, I am thinking of something similar to the console.log implementation of most browsers, e.g. Chrome:
Firefox:
Are you willing to submit a PR? (You must receive approval from the team before submitting a PR.)
- Yes
Alternatives
No response
Additional context
No response
- Dominant language
- Python
- Stars
- 22.9k
- Forks
- 1.3k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 380
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from marimo-team/marimo
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
marimo-team/marimo#12027 ·
Maintainers usually reply within 1 day
-
"Clamp all outputs" leaves cells without output marked `expand_output: true`Possibly taken @marthacryan claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
marimo-team/marimo#11768 · 1 assignee ·
Maintainers usually reply within 1 day
-
Cell referencing a variable from a "cancelled" cell runs and raises NameError instead of being blockedMay be free again @dmadisetti claimed this 33 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
marimo-team/marimo#11307 · 1 assignee ·
Maintainers usually reply within 1 day
-
molab
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
marimo-team/marimo#11298 · 1 comment ·
Maintainers usually reply within 1 day
-
Theme change does not affect terminal colorsMay be free again @CloudCorpRecords claimed this 36 days ago, and no pull request is open. Openneeds discussion
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
marimo-team/marimo#11244 · 4 comments ·
Maintainers usually reply within 1 day
All issues in marimo-team/marimo
Similar issues
-
run_gate loads a custom tasks file from outside the working directoryPossibly taken @Ru0k3 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MakazhanAlpamys/Soup#3189 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
nautechsystems/nautilus_trader#5741 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
huggingface/datasets#9128 ·
Maintainers usually reply within 1 day