Refactoring `_data_setter` & Co.
brisvag opened this issue · comments
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]
As we discussed, we are going to keep data
and _data_setter
s. I will think about implementing a "smart" setter for MultiBlocks!