You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Set classes, ExperimentSet, TraceSet, ConfigurationParameterDescriptorSet, ConfigurationSet, ConfigurationSourceSet and OutputDescriptorSet are not usable by themselves as collections.
__getitem__ could be implemented as well to allow indexing with integers (traces[0]), but it is not implemented for Python sets, so it would make the "Set" classes look less like sets.
If this kind of functionality is wanted, I can help provide patches.
The text was updated successfully, but these errors were encountered:
The Set classes,
ExperimentSet
,TraceSet
,ConfigurationParameterDescriptorSet
,ConfigurationSet
,ConfigurationSourceSet
andOutputDescriptorSet
are not usable by themselves as collections.This gives you access patterns like:
This is especially inconvenient when working with experiments, since to loop over traces, you must do:
We could make the classes easier to work with by making them implement collection interfaces.
This would give you the following access patterns instead:
See example in this commit.
__getitem__
could be implemented as well to allow indexing with integers (traces[0]
), but it is not implemented for Python sets, so it would make the "Set" classes look less like sets.If this kind of functionality is wanted, I can help provide patches.
The text was updated successfully, but these errors were encountered: