From: Ben Bleything Date: 2007-09-17T02:40:04+09:00 Subject: Re: bug with assignment? On Mon, Sep 17, 2007, Mukund wrote: > Here a["alpha"] and b["alpha"] both contain an array of [23,100]. > Why?? It's this line, right here. > a["alpha"]=b["alpha"]=[] What's happening is the a["alpha"] is getting the result of b["alpha"]=[], which is the empty array on the far-right of the assignment. Both a["alpha"] and b["alpha"] contain a reference to the same array. > If I remove the multiple assignment, > a["alpha"]=[] > b["alpha"]=[] a["alpha"] and b["alpha"] now are both references to *different* empty arrays. Hope that helps :) Ben