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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com