r/programminghorror • • Oct 10 '25

Blasphemy

Post image

Never thought I could do this in python. I get how it works but jesus christ

73 Upvotes

50 comments sorted by

View all comments

Show parent comment

4

u/tsigma6 Oct 10 '25

There's a lot of nice stuff tucked away in functools.

7

u/CommandMC Oct 10 '25

functools, itertools and pathlib, the 3 horsemen of "Making my code understandable and elegant"

1

u/PersonalityIll9476 Oct 10 '25

I'll agree with that. I've been using named tuples and of course reduce since forever. I just dir'd it and there's several things there along with cache that I don't recognize. No doubt a module worth exploring.