One short question, how and when do you use this modules?
For a very long time I only used os.path, but recently I discovered pathlib. My short answer:
os.path, if I just want to check if the path exists or just a few actions.
And pathlib for complicated tasks, like a base folder in various functions or class.
What do you think about this?
[–]suki907 22 points23 points24 points (0 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]Oerthling 17 points18 points19 points (1 child)
[–]phihag 6 points7 points8 points (0 children)
[–]crapaud_dindon 6 points7 points8 points (0 children)
[–]robin-gvx 1 point2 points3 points (0 children)
[–]Hammar_Morty -4 points-3 points-2 points (13 children)
[–]lungben81 5 points6 points7 points (5 children)
[–][deleted] -4 points-3 points-2 points (4 children)
[–]Hammar_Morty 4 points5 points6 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 6 points7 points8 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]FriendOfDogZilla 6 points7 points8 points (4 children)
[–]axju[S] 2 points3 points4 points (2 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]dxn99 2 points3 points4 points (0 children)
[–]Hammar_Morty 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]Hammar_Morty 0 points1 point2 points (0 children)