Open ffl096 opened 9 months ago
@ffl096 there is an issue here though. Iter iterates only over nodes now consistent with NetworkX (we just closed this issue recently ). So it would make more sense to make __getitem__
also works same way? namely it will only check if a node is in the complex. If one wants to check if an item is in the complex then one should check in CC.cells or PC.paths or SC.simplices, also consistent with NetworkX, what do you think?
I agree on that, __iter__
, __contains__
and so on should be consistent in that a complex does not "contain" something that is not iterated over ect. We have to update the documentation of Complex.__contains__
for that.
The function
__contains__
is not consistently implemented across different complex types:The
Complex
ABC documents that__contains__
checks whether the complex contains an item (i.e., simplicial and path complexes are correct).