Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container item delete methods #526

Open
mpsonntag opened this issue Aug 31, 2021 · 1 comment
Open

Container item delete methods #526

mpsonntag opened this issue Aug 31, 2021 · 1 comment

Comments

@mpsonntag
Copy link
Contributor

Currently there is no documented obvious way to remove existing NIX entities.

When looking through the code, one can see, that there are __delitem__ methods on the custom container classes, so items can be removed either by accessing these magic functions or by using the del keyword, but this is not obvious to the average user.

Is there a reason for not providing a remove or delete method on Container instances?

@achilleas-k
Copy link
Member

I don't think there's any reason not to have them. I think we always relied on del container[objectname] since our container objects are meant to behave like dictionaries, but maybe a .remove(objectname) or .delete(objectname) would be more discoverable and convenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants