Python 3.8 type annotations #901
Closed
MischaPanch
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Btw, gymnasium only supports python >=3.8, so there is no real point maintaining support for lower versions in my opinion |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, thank you for the great library! I started using it today and noticed that quite some parts of the code rely on string interfaces. For example.
DDPGPolicy.forward
acceptsmodel
as a string and proceeds to using__getattr__
. There is no type and no documentation on the allowed inputs, which here are"actor"
and"actor_old"
.Now my question: would you be interested in dropping python 3.6 support in favor of 3.8 or higher? It's been a while since that's been out and it has a much richer type system. For example, here one could annotate with
Literal["actor", "actor_old"]
, which would significantly improve the readability as well as type safety.I would be happy to open a PR then
Beta Was this translation helpful? Give feedback.
All reactions