[Python-Dev] What this code should do?
fijall at gmail.com
Fri Sep 19 21:34:48 CEST 2008
On Fri, Sep 19, 2008 at 9:30 PM, Jean-Paul Calderone <exarkun at divmod.com> wrote:
> On Fri, 19 Sep 2008 18:26:05 +0200, Amaury Forgeot d'Arc
> <amauryfa at gmail.com> wrote:
>> Hello Maciej,
>> Maciej Fijalkowski wrote:
>>> I'm a little clueless about exact semantics of following snippets:
>>> is this fine?
>>> or shall I fill the bug?
>>> (the reason to ask is because a) django is relying on this b) pypy
>>> implements it differently)
>> Note that python 3.0 has a different behaviour; in the first sample, it
>> A (<class 'NameError'> ...
>> B (<class 'ZeroDivisionError'>, ...
>> See the subtle differences between
> The second example changes its behavior, too. It gives back the NameError
> from the exc_info call. I'm having a hard time reconciling this with the
> Python 3.0 documentation. Can you shed some light?
I think in python 2.x it's at least against the principle of least
surprise. It should not behave differently. The behavior of python 3
though it's even against docs :-/
More information about the Python-Dev