4 ms·
The wtfs about id and is are not deserved. These operations are not used in normal code and are explicitly implementation defined. I suppose they should have na
by cuteboy19 4y ago
The wtfs about id and is are not deserved. These operations are not used in normal code and are explicitly implementation defined. I suppose they should have named it __is and __id. I don't see why anyone not hacking the interpreter would care about these though
- Liquid_Fire 4y agoI agree about id() but `is` is absolutely used (and needed) in normal code. But generally not on strings or integers, which are the types that have weird results with it. Simple example: any sort of graph algorithm that needs to know if two nodes are the same node.
- cuteboy19 4y agoYou should really use a nodeid in that case and compare nodeids. So that you can serialize your graph