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

Refactoring _data_setter & Co. #23

Closed
brisvag opened this issue Nov 18, 2020 · 1 comment
Closed

Refactoring _data_setter & Co. #23

brisvag opened this issue Nov 18, 2020 · 1 comment

Comments

@brisvag
Copy link
Owner

brisvag commented Nov 18, 2020

We should get rid of the assumption that all datablocks want to use a data attribute, and that they should all use _data_setter for that. It's either resctrictive or useless for how groublocks or simply more complex datablocks work.

I think all datablock where it's obvious and intuitive should have easy access through __setitem__ like now, but without forcing an internal api for how to do that. As for more complex stuff: we should probably implement a "smart" setter/getter; maybe:

Particles[2]

should return something like

[position, orientation, property]
@brisvag
Copy link
Owner Author

brisvag commented Nov 20, 2020

As we discussed, we are going to keep data and _data_setters. I will think about implementing a "smart" setter for MultiBlocks!

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