Hacker News new | ask | show | jobs
by futureastronaut 2654 days ago
It's mostly a bikeshed and a signaling thing. Only a "noob" wouldn't know about enumerate(), right? The program could be brilliant in much higher level ways, but mid/senior only-knows-Python hot shot will jump on your anti-idiom like a dog on a dropped hamburger. Including such anti-idioms in your public code can filter out people like that.
1 comments

Where are you meant to learn this?
Python's list of built-in functions is fairly small https://docs.python.org/3/library/functions.html#built-in-fu... (but to be clear, I wouldn't ding somebody for forgetting about one of them).
Reading other people's code (usually while improving it)
https://docs.python.org/3/

Consider that your iterable may not be a list, and may not actually have a "length" prior to its being consumed