Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sets and ArrayLists not converted to python sets/lists #4

Closed
tshirtman opened this issue Aug 20, 2012 · 2 comments
Closed

Sets and ArrayLists not converted to python sets/lists #4

tshirtman opened this issue Aug 20, 2012 · 2 comments

Comments

@tshirtman
Copy link
Member

This makes itterating over them painful.

@tito
Copy link
Member

tito commented Aug 20, 2012

The python list are used when converting native Java array, not Java objects.
You can use the toArray() method to have a native list over an ArrayList or Set :)

@tito tito closed this as completed Aug 20, 2012
@flying-sheep
Copy link

But sets are different from lists, tuples and arrays: they hash the entries, allowing fast lookups: "somestring" in some_set is approx. O(1), while the same operation on a list or tuple is O(n). Also sets have arbitrary(=no) item order. If a set is used somewhere, the author most certainly decided that look up speed is important while order is irrelevant.

Also tuple<->Array and list<->ArrayList make a better match, than list<->Array, but I can see why you made that decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants