[Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)
Xavier Morel
catch-all at masklinn.net
Thu Aug 6 12:25:25 CEST 2009
More information about the Python-Dev mailing list
Thu Aug 6 12:25:25 CEST 2009
- Previous message: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)
- Next message: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6 Aug 2009, at 00:22 , Jeff McAninch wrote: > I'm new to this list, so please excuse me if this topic has been > discussed, but I didn't > see anything similar in the archives. > > I very often want something like a try-except conditional expression > similar > to the if-else conditional. I fear this idea is soon going to extend to all compound statements one by one. Wouldn't it be smarter to fix the issue once and for all by looking into making Python's compound statements (or even all statements without restrictions) expressions that can return values in the first place? Now I don't know if it's actually possible, but if it is the problem becomes solved not just for try:except: (and twice so for if:else:) but also for while:, for: (though that one's already served pretty well by comprehensions) and with:.
- Previous message: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)
- Next message: [Python-Dev] (try-except) conditional expression similar to (if-else) conditional (PEP 308)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list