Greg Ewing wrote: > Baptiste Carvello wrote: > >> what about >> >> except <type> with <value>: >> >> a program dies "with" an error message, not "as" an error message. > > No. The exception object you're catching *is* the value, > not something which *has* a value. I maintain that "as" > is the correct word to use here. > > Greg I think it reads well with "as" also. +1 To me it's a filter statement. So would catching multiple exceptions have the form: except (<type>, <type>) as <name>: The value is bound to the name if it's type is in the sequence. This would be an indirect assignment similar to. if value in list: name = value Which you can't do directly because you don't have access to the value yet. That's not too different than import which is also an indirect name binding operation of a value you don't have yet. Cheers, Ron
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4