2 ms·
Indeed, I misremembered the semantics of for-else! I don't think I have actually used it in python :)
by gpderetta 4y ago
Indeed, I misremembered the semantics of for-else! I don't think I have actually used it in python :)
- deredede 4y agoYeah for-else as implemented in Python is... not actually that useful. It's the right tool to inline std::find_if and that's basically it. I think the behavior you had in mind would actually be more intuitive and more useful. OTOH, try...else I find myself missing at times.