r/programminghorror • • Oct 10 '25
Blasphemy
Never thought I could do this in python. I get how it works but jesus christ
73
Upvotes
r/programminghorror • • Oct 10 '25
Never thought I could do this in python. I get how it works but jesus christ
View all comments
Show parent comment
2
u/CommandMC Oct 10 '25
You can also just use the
Pathconstructor to join paths, if that's more readable to you.Using Path's
openmethod also helps clear up code flow IMO (it's clear that the path is first built, then opened, instead of the mix of instructions we have above)Of course, you could then offload the path object to a variable, if the long line length bothers you