From: doublep <re...@bu...> - 2009-09-14 12:55:29
|
New submission from doublep <p.p...@an...>: Tested with 2.5.0 and 2.5.1rc2. See also issue 1333. Java code: public interface Foo <Type> { Type getFoo (); } public class FooImpl implements Foo <String> { private String foo; public String getFoo () { return foo; } public void setFoo (String foo) { this.foo = foo; } } Python code: import FooImpl x = FooImpl (foo = 'bar') print x.foo Result: Traceback (most recent call last): File "foo.py", line 3, in <module> x = FooImpl (foo = 'bar') AttributeError: read-only attr: foo Note that the template/generic (i.e. <Type>) seems to be essential. Otherwise there is no bug. ---------- components: Core messages: 5153 nosy: doublep severity: normal status: open title: attribute wrongly deemed 'read-only' if getter comes from a _templated_ interface versions: 2.5.0, 2.5.1 _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1467> _______________________________________ |