You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the left over issues from Python 2 is the ambiguity between bytes, bytearray, and str when selecting the overload for byte[] and char[]. Simple commands like JString(bytearray([1])) currently fail with ambiguity between java.lang.String(char[]) and java.lang.String(byte[]). bytearray is pretty obviously best matched to byte[] but we have three implicit conversions defined that match ''PyUnicode'', ''PyBytes'', and ''PySequence''.
I would recommend modifying the matches to be
byte[] <=> str (none) reason: string to math type prohibited)
byte[] <=> bytes, bytearray (exact) reason: bytes are bytes
byte[] <=> Sequence (implicit) reason: a list of numbers can be converted
char[] <=> str (exact)
char[] <=> Sequence, bytes, bytearray (implicit)
Personally I think the last one should be "none" but it would break code.
The text was updated successfully, but these errors were encountered:
One of the left over issues from Python 2 is the ambiguity between bytes, bytearray, and str when selecting the overload for byte[] and char[]. Simple commands like
JString(bytearray([1]))
currently fail with ambiguity betweenjava.lang.String(char[])
andjava.lang.String(byte[])
. bytearray is pretty obviously best matched tobyte[]
but we have three implicit conversions defined that match ''PyUnicode'', ''PyBytes'', and ''PySequence''.I would recommend modifying the matches to be
byte[] <=> str (none) reason: string to math type prohibited)
byte[] <=> bytes, bytearray (exact) reason: bytes are bytes
byte[] <=> Sequence (implicit) reason: a list of numbers can be converted
char[] <=> str (exact)
char[] <=> Sequence, bytes, bytearray (implicit)
Personally I think the last one should be "none" but it would break code.
The text was updated successfully, but these errors were encountered: