You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was toying around with some typing in a small but "hacky" vector-maths module and found myself wondering if it was possible to make a generic type along the lines of Vector[3] where the 3 holds actual meaning/can be used in some fashion. I am unsure if this is possible with mypy as it stands now, and if not if this is something that is ever going to be possible (be it because it is "ugly" or outside of what mypy is trying to achieve).
For example some of such "vector-math-module" code could look like this:
Yeah, this has been discussed. We'd like to probably support something along this lines to enable better numpy support, but though a lot of things have been discussed it isn't on the roadmap right now to get core dev work done on it.
#3345 is one issue about it; there might be others.
Hi, I was toying around with some typing in a small but "hacky" vector-maths module and found myself wondering if it was possible to make a generic type along the lines of
Vector[3]
where the3
holds actual meaning/can be used in some fashion. I am unsure if this is possible with mypy as it stands now, and if not if this is something that is ever going to be possible (be it because it is "ugly" or outside of what mypy is trying to achieve).For example some of such "vector-math-module" code could look like this:
The text was updated successfully, but these errors were encountered: