Uploaded image for project: 'PyLucene'
  1. PyLucene
  2. PYLUCENE-39

JArrays are no longer sliceable under Python 3.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      JCC 3

      Description

      JArray objects use the legacy _getslice_ implementation, and hence aren't sliceable in Python 3.

      In []: lucene.JArray_byte(b'abc')[:]
      ...
      TypeError: sequence index must be integer, not 'slice'
      

      I'm not necessarily advocating that they should be sliceable, just that it's a regression. It's also worth noting that slices returned Python sequences, not JArray objects, which I think is worth revisiting if it's going to be re-implemented anyway.

        Activity

        Hide
        vajda Andi Vajda added a comment -

        fixed in rev 1812596

        Show
        vajda Andi Vajda added a comment - fixed in rev 1812596

          People

          • Assignee:
            Unassigned
            Reporter:
            coady A. Coady
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development