Skip to content

Slicing a Python list converted from Java fails #24

Description

@ctrueden
>>> jl = ArrayList([1, 3, 5, 7, 9])
>>> jl.toString()
'[1, 3, 5, 7, 9]'
>>> pl = scyjava.to_python(jl)
>>> type(pl)
<class 'scyjava.JavaList'>
>>> print(pl)
[1, 3, 5, 7, 9]
>>> pl[:]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/curtis/miniconda3/envs/i2k-2020-pyimagej/lib/python3.8/site-packages/scyjava/__init__.py", line 330, in __getitem__
    return to_python(self.jobj.get(key), gentle=True)
TypeError: No matching overloads found for java.util.ArrayList.get(slice), options are:
	public java.lang.Object java.util.ArrayList.get(int)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions