Skip to content

variable sharing by chapter #6745

Description

@asterix314

Description

Currently, variables in marimo are either global or cell-private. It would be convenient to have variable sharing at a scope somewhere in between these 2 extremes, e.g. chapter level (second level header in markdown), where the discussion is focused on a specific topic so variable sharing above the cell level is a legitimate need, but still avoids dumping everything in the global space.

Suggested solution

Ideally, a notebook configuration setting specifies at which level of heading the variables are to be shared. And all cells under the specified markdown heading share their variables. Underscored variables remain cell-private.

Are you willing to submit a PR?

  • Yes

Alternatives

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions