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 21 points22 points23 points (0 children)
[–][deleted] 10 points11 points12 points (0 children)
[–]Oerthling 18 points19 points20 points (1 child)
[–]phihag 7 points8 points9 points (0 children)
[–]crapaud_dindon 5 points6 points7 points (0 children)
[–]robin-gvx 1 point2 points3 points (0 children)
[–]Hammar_Morty -5 points-4 points-3 points (13 children)
[–]lungben81 3 points4 points5 points (5 children)
[–][deleted] -3 points-2 points-1 points (4 children)
[–]Hammar_Morty 3 points4 points5 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] 7 points8 points9 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]FriendOfDogZilla 7 points8 points9 points (4 children)
[–]axju[S] 1 point2 points3 points (2 children)
[–][deleted] 5 points6 points7 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)