[pypy-issue] [issue1108] [cpyext] TypeError instead of AttributeError when assigning to read-only fields of extension types

Armin Rigo tracker at bugs.pypy.org
Mon Apr 2 10:41:03 CEST 2012


Armin Rigo <armin.rigo at gmail.com> added the comment:

TypeError vs AttributeError is a common problem where CPython is not consistent
at all.  If we find a clear place that raises the TypeError in PyPy just for
this case, then we can fix it.  But I rather think that it's done by generic
code (a quick look through cpyext's w_TypeError makes me think so).  We usually
"fix" it by changing the tests to accept (AttributeError, TypeError) instead of
only one of them.

----------
nosy: +arigo
status: unread -> wontfix

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1108>
________________________________________


More information about the pypy-issue mailing list