Is there a way to expose a PathBuf struct member as a Python's pathlib.Path member?
#3474
Unanswered
AngheloAlf
asked this question in
Questions
Replies: 1 comment 3 replies
-
|
You could write a custom |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm porting a Python library to PyO3 and everything is working fine, up until testing this Python class to Rust:
Python:
Rust:
For some reason the Rusts version converts the
filepathmember to astrinstead of apathlib.Pathwhen accessing it from Python, which feels a bit inconsistent since thenewmethod takes aPathBufand making a Python instance errors if I don't pass apathlib.Path.Am I doing something wrong?
I'm using PyO3 0.19.0
Beta Was this translation helpful? Give feedback.
All reactions