Saturday, 24 December 2022

Type hint that excludes a certain type

In Python, is it possible to declare a type hint that excludes certain types from matching? For example, is there a way to declare a type hint that is "typing.Iterable except not str" or the like?



from Type hint that excludes a certain type

No comments:

Post a Comment