Skip to content

Make cell.empty read only #3072

@quaquel

Description

@quaquel

What's the problem this feature will solve?
Currently, cells have two ways of getting their full/empty state: cell.empty and cell.is_empty. The former is a view into the underlying empty property layer on the space. The latter is the actual check if self-agents are empty.

It is easy to invalidate the property layer by setting cell.empty directly yourself, and since it is part of the public API, nothing will warn the user or prevent the user from doing so

Describe the solution you'd like
Ideally, we add a way to add read-only property layer descriptors, while still allowing the cell to privately change its value.

Additional context
See also #3068 for more background on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions