News for hackers. Stuff that matters.
Re:What’s inside Python ‘for’ loop? by Tomminn on Monday March 25, 2019 @11:30PM (#19489073)
Duh- reading comprehension fail- cheers. Same question though, there is still something that makes me uncomfortable about using exceptions as an expected-case control flow structure (as in, this is expected to catch an exception once every for loop call). Is that something I should get over, and should I write more code that uses exceptions in this fashion?
Re:What’s inside Python ‘for’ loop? by newen on Tuesday March 26, 2019 @12:19AM (#19489264)
Python's official implementation is very slow and they don't care about performance. I wouldn't try to take any lessons from the way Python is implemented.
Re:What’s inside Python ‘for’ loop? by NikkiA on Tuesday March 26, 2019 @03:51AM (#19489931)
You are correct that this use of exceptions is very bad code smell.