2.2 features
Paul Prescod
paulp at ActiveState.com
Fri Aug 3 16:39:21 EDT 2001
Tim Peters wrote:
>
> [Paul Prescod]
> > ...
> > Yes "x in class y" would be a boolean expression elsewhere but that's
> > just like the current exception syntax which looks like a tuple
> > constructor but isn't really. Either we try to reuse syntax or we don't.
>
> The current exception syntax *does* accept a tuple constructor: the special
> case you're "seeing" doesn't actually exist. For example,
>
> try:
> # whatever
> except (OverflowError, ZeroDivisionError):
> pass
I'm talking about the comma between the variable name and the exception
type. It looks like a tuple constructor or an unpack or something else
tuple-related. It also looks totally symmetrical which is another
problem.
> ... Combine it with some backward-compatibility hacks, and you can do
> some, umm, "interesting" things with this:
I wouldn't want to interfere with that important feature. <wink>
--
Take a recipe. Leave a recipe.
Python Cookbook! http://www.ActiveState.com/pythoncookbook
More information about the Python-list
mailing list