[pypy-dev] Was dict subclass discrepancy "fixed" (issue 708)?
Luciano Ramalho
luciano at ramalho.org
Thu Nov 27 12:53:00 CET 2014
Thanks Armin and Philip for responding and thanks Arming fixing the
example in the docs.
Best,
Luciano
On Thu, Nov 20, 2014 at 7:54 AM, Armin Rigo <arigo at tunes.org> wrote:
> Hi,
>
> On 19 November 2014 23:52, Philip Jenvey <pjenvey at underboss.org> wrote:
>> I'm still getting the expected discrepancy between the two: Exception raised on both pypy and pypy3, whereas __getitem__ isn’t called on CPython 2.7.5. You might want to double check your python binaries?
>
> Indeed, issue 708 isn't "fixed". However, our documentation is
> out-of-date: the (different) example given at
> http://pypy.readthedocs.org/en/latest/cpython_differences.html#subclasses-of-built-in-types
> now works the same was as CPython. For reference, this example is:
>
> class D(dict):
> def __getitem__(self, key):
> return 42
> d1 = {}
> d2 = D(a='foo')
> d1.update(d2)
> print d1['a']
>
> I'm going to find another simple example to update the docs with...
>
>
> A bientôt,
>
> Armin.
--
Luciano Ramalho
Twitter: @ramalhoorg
Professor em: http://python.pro.br
Twitter: @pythonprobr
More information about the pypy-dev
mailing list