[pypy-issue] [issue1585] `type.__dict__['__dict__'].__objclass__` doesn't exist

Armin Rigo tracker at bugs.pypy.org
Thu Aug 22 23:51:41 CEST 2013


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

It will likely be closed as "won't fix", with a note added to
http://pypy.readthedocs.org/en/latest/cpython_differences.html .  The issue is
that CPython has a forest of 4 very internal types, and PyPy has only 2, I
think.  "type.__dict__['__dict__']" is one of these.  We still try to emulate
CPython by providing the union of their strange attributes, but in some cases
(like here) we just give up.

In this case the issue is that "type.__dict__['__dict__']" is, on PyPy, just a
usual property that can be used to read or write the __dict__ of anything (as
long as it has a dict, of course).  In particular, there is only one such
property object; it is not attached to a particular class.  It could be changed,
but we need to decide if it's worth it.

----------
nosy: +arigo

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


More information about the pypy-issue mailing list