Title: Can't initialise int[] property with tuple
Type: crash Severity: normal
Components: Core Versions: 2.5.1
Status: closed Resolution: invalid
Dependencies: Superseder:
Assigned To: Nosy List: petegibson, pjenvey, zyasoft
Priority: normal Keywords: RFE

Created on 2009-05-13.01:58:23 by petegibson, last changed 2009-05-31.05:36:15 by pjenvey.

msg4678 (view) Author: Peter Gibson (petegibson) Date: 2009-05-13.01:58:23
I get an error when initializing a property that expects an int[] using
a tuple (in 2.5rc2):

    File <blah>, line 176, in init_sash_form
    self.sash_form.weights = (30, 70)

    TypeError: No visible constructors for class ([I)

Prototype for property weights:
     void     setWeights(int[] weights) 

However, there are no problems when using a list instead.
msg4717 (view) Author: Jim Baker (zyasoft) Date: 2009-05-23.21:02:36
This seems like a candidate for additional unification of list/tuple.
Also int[] is more like a tuple than a list.
msg4769 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-31.05:31:26
This is arguably not a bug as the tuple is specially handled for java 

We couldn't treat tuples as anything mutable anyway
msg4770 (view) Author: Philip Jenvey (pjenvey) Date: 2009-05-31.05:36:02
Well, I guess we *could*, but it sounds a bit odd to me. It'd be making an 
assignment operation create a mutable copy of an immutable object
Date User Action Args
2009-05-31 05:36:15pjenveysetmessages: + msg4770
2009-05-31 05:31:46pjenveysetstatus: open -> closed
resolution: invalid
messages: + msg4769
nosy: + pjenvey
2009-05-23 21:03:13zyasoftsetpriority: normal
2009-05-23 21:02:46zyasoftsetversions: + 2.5.1
2009-05-23 21:02:36zyasoftsetkeywords: + RFE
nosy: + zyasoft
messages: + msg4717
2009-05-13 01:58:23petegibsoncreate