Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable using pathlib.Path for file references #331

Open
JosephCottam opened this issue Aug 10, 2023 · 0 comments
Open

Enable using pathlib.Path for file references #331

JosephCottam opened this issue Aug 10, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@JosephCottam
Copy link
Contributor

Since python 3.4, pathlib.Path is the preferred high-level file-path work (and building up path strings is often considered high-level). This is in place of string-composition (even through os.path.join). Many current interfaces that may take a path (e.g., load_petri_model) test for string-or-object, but this cause a problem if a Path is passed.

The current work-around is to convert the path to a string before passing it in, but I propose that we update the allowed Union to include pathlib.Path objects and add that support to the corresponding functions.

@JosephCottam JosephCottam added the enhancement New feature or request label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant