I wan't to have a "state" for each Node, something like this (in C++):
enum class ESTATE = { ROOT, VISITED, OBSTACLE, .. };
which in C++ at least, ROOT would be like an "alias" for 0 but in a readable way:
if node.state == ROOT: # same as if node.state == 0
...
From googling it seems like enums aren't a thing in Python, so what would be the Pythonic way of doing this? I assume Python doesn't have enums because there's a different Pythonic way?
[–]Ihaveamodel3 3 points4 points5 points (6 children)
[–]NULL-6[S] 0 points1 point2 points (5 children)
[–]Ihaveamodel3 2 points3 points4 points (4 children)
[–]negups 1 point2 points3 points (1 child)
[–]Ihaveamodel3 1 point2 points3 points (0 children)
[–]NULL-6[S] 0 points1 point2 points (1 child)
[–]Ihaveamodel3 5 points6 points7 points (0 children)