-
When I have some custom py::class_<TileIndex>(m, "Tile_")
.def(py::init_implicit<uint32_t>())
.def(py::new_([](unsigned int xy){ return TileIndex(xy);}))
.def(py::new_([](unsigned int x, unsigned int y){ return TileXY(x,y);}))
; … how do I create a subclass in Python? from tile_cpp import Tile_
class Tile(Tile_):
pass
print(type(Tile())) … emits "Tile_", apparently because Python sees the special The docs says that I can write a static |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Does PR #859 address your issue? |
Beta Was this translation helpful? Give feedback.
-
It should. Not yet tested but I will do that shortly. |
Beta Was this translation helpful? Give feedback.
-
Update: Yes it does. It also makes my A* pathfinder three times faster. Thanks @oremanj ! |
Beta Was this translation helpful? Give feedback.
Update: Yes it does. It also makes my A* pathfinder three times faster. Thanks @oremanj !