Override __eq__
methods of Node
and other UXsim object?
#135
Labels
__eq__
methods of Node
and other UXsim object?
#135
Currently we can specify Node (or Link, Vehicle) by Node object itself or its name which is str. This is sometimes confusing and causes a bug. It may be possible to solve this issue by overriding
__eq__
method (==
) properly so that something likenode == "node_name"
holds true ifnode.name = "node_name"
.Also, it will be great if we can use Node object and node name as a dictionary key interchangeably.
But I am not familiar to overriding
__eq__
method, so this requires some study.The text was updated successfully, but these errors were encountered: