Message5153

Author doublep
Recipients doublep
Date 2009-09-14.12:55:17
SpamBayes Score 1.831868e-14
Marked as misclassified No
Message-id <1252932918.49.0.57332212509.issue1467@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-09-14 12:55:18doublepsetrecipients: + doublep
2009-09-14 12:55:18doublepsetmessageid: <1252932918.49.0.57332212509.issue1467@psf.upfronthosting.co.za>
2009-09-14 12:55:18doubleplinkissue1467 messages
2009-09-14 12:55:17doublepcreate