Skip to content

Table collection returned by ts.tables not read-only. #760

Open
@jeromekelleher

Description

@jeromekelleher

One thing that has been bugging me is the description of mutability. If you have a tree sequence, calling the functions that change it do not raise an error (like the various add_row methods). Rather, they just silently do nothing.

Originally posted by @molpopgen in #756 (comment)

It would be good to do this, and the plan is for the table collection to be read-only so that we can avoid taking copies when creating a new set of tables. However, I think there would be a fair bit of work required to do this at the Python level, and we'll still want to actually mark things as read-only at the C level (so we can be sure things are safe). So, I think we should just tackle this properly when we do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Python APIIssue is about the Python APIenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions