Hi Armin

Any chance we can add this to cpython-differences? Couldn't find it
last time (and misremembered)

On Tue, Apr 26, 2016 at 11:38 PM, Armin Rigo <ar...@tunes.org> wrote:
> Hi,
>
> On 26 April 2016 at 19:02, Carl Friedrich Bolz <cfb...@gmx.de> wrote:
>> Those are simple cases, of course we use the same exception types there.
>> However, if you write exactly the wrong obscure code you sometimes get a
>> different exception type under some conditions.
>
> That's about TypeError versus AttributeError for some attributes of
> built-in types in corner cases.  That's not about ValueError.  For example:
>
>>>> def f(): pass
>>>> del f.__closure__
>
> You get a TypeError in CPython, but an AttributeError in PyPy.  That's
> because PyPy doesn't have the same zoo of built-in attribute types of
> CPython.  For most purposes it doesn't make a difference, but it turns
> out that in this case half of these types raise AttributeError and the
> other half raises TypeError in CPython.
>
>
> A bientôt,
>
> Armin.
> _______________________________________________
> pypy-dev mailing list
> pypy-dev@python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to