Author jeff.allen
Recipients jeff.allen, zyasoft
Date 2019-11-26.20:37:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
My preference (and I'm thinking of Jython 3 too) would be that if an object claims as the name of its Python type, the name of a Java type, then it should behave exactly as the Java documentation describes.

It is certainly useful to be able to pass a list returned from a Java method into a Python function and have it treated as a list, but then inside the Python function I think it should behave exactly as a Python list. Otherwise, the result may not be according to the contract of the Python code.

This involves some kind of wrapper that proxies the Java List, and ideally, claims the type 'list'. I'm not sure this is possible in 2.7, but I have an idea to allow multiple implementations of a single Python type. The wrapper could go on:

1. On return from the Java function. (Not keen as we lose Java added value )
2. Implicitly as it becomes a call argument. (Precludes use as Java type in function.)
3. Explicitly with some kind of object.as_list() method. (Other syntax available.)
Date User Action Args
2019-11-26 20:37:22jeff.allensetmessageid: <>
2019-11-26 20:37:22jeff.allensetrecipients: + jeff.allen, zyasoft
2019-11-26 20:37:22jeff.allenlinkissue2838 messages
2019-11-26 20:37:22jeff.allencreate