Ok, so I found out that even though mylist[] and all objects in it were
fine ie id(mylist[i]) != id(mylist[all others]) what was happening is
that during a reproduction function a shallow copies were being made
making all offspring (genetic algorithm) have different
id(mylist[0..n]), however the ac
Ok, so I found out that even though mylist[] and all objects in it were
fine ie id(mylist[i]) != id(mylist[all others]) what was happening is
that during a reproduction function a shallow copies were being made
making all offspring (genetic algorithm) have different
id(mylist[0..n]), however the ac
Ok, so I found out that even though mylist[] and all objects in it were
fine ie id(mylist[i]) != id(mylist[all others]) what was happening is
that during a reproduction function a shallow copies were being made
making all offspring (genetic algorithm) have different
id(mylist[0..n]), however the ac
Ok, so I found out that even though mylist[] and all objects in it were
fine ie id(mylist[i]) != id(mylist[all others]) what was happening is
that during a reproduction function a shallow copies were being made
making all offspring (genetic algorithm) have different
id(mylist[0..n]), however the ac
Ok, so I found out that even though mylist[] and all objects in it were
fine ie id(mylist[i]) != id(mylist[all others]) what was happening is
that during a reproduction function a shallow copies were being made
making all offspring (genetic algorithm) have different
id(mylist[0..n]), however the ac
[EMAIL PROTECTED] a écrit :
> The Problem (very basic, but strange):
>
> I have a list holding a population of objects, each object has 5 vars
> and appropriate funtions to get or modify the vars.
Which are probably not necessary:
http://dirtsimple.org/2004/12/python-is-not-java.html
(in short:
John Zenger wrote:
> Your list probably contains several references to the same object,
> instead of several different objects. This happens often when you use a
> technique like:
>
> list = [ object ] * 100
>
> ..because although this does make copies when "object" is an integer, it
> just makes
John Zenger wrote:
> Your list probably contains several references to the same object,
> instead of several different objects. This happens often when you use a
> technique like:
>
> list = [ object ] * 100
This is most likely what's going on. To the OP: please post the
relevant code, including
On Fri, 07 Apr 2006 21:18:12 -0400, John Zenger wrote:
> Your list probably contains several references to the same object,
> instead of several different objects. This happens often when you use a
> technique like:
>
> list = [ object ] * 100
>
> ..because although this does make copies when
Your list probably contains several references to the same object,
instead of several different objects. This happens often when you use a
technique like:
list = [ object ] * 100
..because although this does make copies when "object" is an integer, it
just makes references in other cases.
[E
The Problem (very basic, but strange):
I have a list holding a population of objects, each object has 5 vars
and appropriate funtions to get or modify the vars. When objects in
the list have identical vars (like all = 5 for var "a" and all = 10 for
var "b" across all vars and objects) and i chang
11 matches
Mail list logo