Possible to get original python type name? Ie distinguish between str and pathlib.Path #3720
-
Is there a way to get the original python type? For example if I have an api that takes an argument that could be either a string OR a path, I can't seem to find any way of distinguishing that information from rust. |
Beta Was this translation helpful? Give feedback.
Answered by
adamreichold
Jan 1, 2024
Replies: 1 comment
-
Take |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Falmarri
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Take
&PyAny
as your function argument and useget_type
to get the associated type which as aname
method.