-
Is there a way that you can set both a bound, and a default with PEP 695 syntax with 3.13 type var defaults? I haven't seen any examples of this, so was curious if it was even possible. |
Beta Was this translation helpful? Give feedback.
Answered by
erictraut
Jun 24, 2024
Replies: 1 comment
-
Yes, you can set both a bound and a default, like this: class Foo[T: float = int]: ... |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
max-muoto
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can set both a bound and a default, like this: