Being an exception from how it’s usually implemented in other languages doesn’t make it stupid.
Dennis
51

First of all, no one used the word “stupid” so please don’t imply I did.

This was not about right and wrong, it was mostly about people claiming “idiomatic” Python and then doing things in many different ways. I’m gathering from your profile you are not old enough to remember why Python beat Perl, which was the foundation of my point. Python won on the ‘one best way’ approach and yet there are lots of different ways all competing to be ‘idiomatic’.

In other words I completely agree with the point you are illustrating. Who gets to bless enumerate() as the more “idiomatic” or “pythonic” way? Everyone seems to do that to their own way.

I actually strongly believe performance actually is an issue, but I want to run a benchmark on that. If you have one that would be great.

Like what you read? Give Rob Muhlestein a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.