> >I don't recall why JPython has jarray instead of array -- how do they > >differ? I think it's a shame that similar functionality is embodied > >in different APIs. > > The jarray module is a paper thin factory for the PyArray type which is > primary (I believe) a wrapper around any existing java array instance. > It exists to make arrays returned from java code useful for jpython. > Since a PyArray must always wrap the original java array, it cannot > resize the array. Understood. This is a bit like the buffer API in CPython then (except for Greg's vision where the buffer object manages storage as well :-). > In contrast an array instance would own the memory and can resize it as > necessary. OK, this makes sense. > Due to the different purposes I agree with Jim's decision of making the > two module incompatible. And they are truly incompatible. jarray.array > have reversed the (typecode, seq) arguments. This I'm not so sure of. Why be different just to be different? > OTOH creating a mostly compatible array module for jpython should not be > too hard. OK, when we make array() a built-in, this should be done for Java too. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4