Not in *those* cases, but there are cases where CPython would raise different error classes depending e.g. on whether stuff is builtin function or not builtin function or the cpython errors are inconsistent. In those cases the exact error might be a bit different (I must admit I don't remember examples off hand)
On Tue, Apr 26, 2016 at 6:38 PM, Steven D'Aprano <st...@pearwood.info> wrote: > On Tue, Apr 26, 2016 at 06:16:39PM +0200, Maciej Fijalkowski wrote: > >> Typically the exception type is the same, but there is a bunch of >> differences, especially around ValueError vs TypeError, noone should >> rely on that anyway > > Do you mean that PyPy might change ValueError to TypeError, or vice > versa? Like this: > > # TypeError in CPython > len(None) > => raises ValueError > > # ValueError in CPython > [].index("a") > => raises TypeError > > That doesn't sound good to me. > > If I have misunderstood you, and you're just talking about the error > strings, then that's fine. > > > > -- > Steve > _______________________________________________ > 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