3 ms·
They're basic but also things you'd never look up, especially if you've been doing python a long time. For example, I just learned about f strings, because why
by jedberg 8y ago
They're basic but also things you'd never look up, especially if you've been doing python a long time.
For example, I just learned about f strings, because why would I need to ever look up if there is a replacement for .format()?
And the LRU cache. I've been hand rolling that for years, but I never thought to see if they had added it to the standard library, because why would I look?
- mixmastamyk 8y agoIt pays to look thru the stdlib every so often, there is just so much there, and plenty of dark corners (in the Warcraft sense) to look in. I hand rolled stuff in itertools/functools for years before discovering them.... collections Counter, etc. Or how about str.partition instead of try: str.split() ?
- Twirrim 8y agoOn a related note, every couple of years I make an effort to man page every cli tool I use, and re-read the man page, just in case. Most times I discover there is some argument that I've missed before in a tool (or has been added in the intervening time)
- jedberg 8y agoWhen my dad sold cars he’d always tell his customers to read the car manual again after six months for the same reason.
- stOneskull 8y agodon't you read about what's new when new versions come out?