Re: assignment, references and list comprehension

2005-05-26 Thread Jim O'D
> reading this may help: > > http://effbot.org/zone/python-objects.htm > > > > > site bookmarked ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: assignment, references and list comprehension

2005-05-26 Thread Jim O'D
> trust me, it works the same way for all objects. > > Yes, it was lack of trust that led me on a 2 hour re-write to avoid creating subsets of object lists as I thought they were being copied. In fact it was another error... huh. I now know better. Jim -- http://mail.python.org/mailman/lis

Re: assignment, references and list comprehension

2005-05-26 Thread Fredrik Lundh
"Jim O'D" wrote: > I was confused as to whether the assignment of a result of a list > comprehension created references to the orginal objects... python never copies objects unless you tell it to, so the answer is yes. all the "values" you pass around are object references, not binary blobs. >

assignment, references and list comprehension

2005-05-26 Thread Jim O'D
Hi everyone Was just posting a question as I got confused with a big messy sheaf of code when I thought I should make a simple example myself. Since I did I thought I'd post it for the good of mankind. I was confused as to whether the assignment of a result of a list comprehension created refe