Closed rjdirisio closed 3 months ago
For more detail, I believe iteration is currently possible because of __getitem__
implemented in Vec3
. But, this means that iterating over these fields does not obey modern type checking.
If the answer is simply 'use .tolist()
' I can do that, but I figured I would bring this to your attention.
That's the first feedback I got regarding Python typing – thanks!
This seems to be a limitation of Python type checking, so I'd just ignore (# type: ignore
) it.
Currently, pyi is automatically generated by pybind11-stubgen. Soon (this or next month), I'll switch to nanobind and when nanobind 2.0 gets released, it should have internal support for generating pyi files. I won't be trying to improve the stubs until then.
Looking at the built types in
__init__.pyi
for Vec3, there is no__iter__
method displayed. But, if one loops overVec3
in python, one iterates over x, y, z.