10
Using pathlib in constant?
(lemmy.world)
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
I don't see why not. However I like to have my constants module contain data structures as simple as possible, therefore I would prefer strings (which are also immutable), and create a Path object when I need it. I can see though that you usually won't have the case where you would not want the path to be a Path object.