PL/Python: Fix slicing support for result objects for Python 3

Peter Eisentraut <peter_e@gmx.net>

Commit: a97207b6908f1d4a7d19b37b818367bb0171039f
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2012-05-10T17:40:30Z
Releases: 9.2.0
PL/Python: Fix slicing support for result objects for Python 3

The old way of implementing slicing support by implementing
PySequenceMethods.sq_slice no longer works in Python 3.  You now have
to implement PyMappingMethods.mp_subscript.  Do this by simply
proxying the call to the wrapped list of result dictionaries.
Consolidate some of the subscripting regression tests.

Jan Urbański

Files