2 ms·
Curious what you mean about nested loops? Do you specifically mean nested list comprehensions? If nested they can sometime be less readable than explicit for lo
by andybak 10y ago
Curious what you mean about nested loops? Do you specifically mean nested list comprehensions? If nested they can sometime be less readable than explicit for loops so my advice to a struggling newbie would be "if it hurts stop doing it"
Or did you mean something else?
- probably_wrong 10y agoI don't mean it as "readable", but as in "thanks to type inference, it will take forever". I linked to this question [1] somewhere else, which is something that AFAIK happens only in Python. [1] http://stackoverflow.com/questions/8097408/why-python-is-so-slow-for-a-simple-for-loop#8097669 http://stackoverflow.com/questions/8097408/why-python-is-so-...