Re: Modifying Element In For List

2010-11-19 Thread Steve Holden
On 11/19/2010 12:17 PM, Johannes Bauer wrote: > Am 15.11.2010 18:27, schrieb Duncan Booth: > >> Comparing directly against True or False is error prone: a value in >> Python can be false without actually being equal to False. > > Well, you can always use "is" instead of "==", which makes a compa

Re: Modifying Element In For List

2010-11-19 Thread Johannes Bauer
Am 15.11.2010 18:27, schrieb Duncan Booth: > Comparing directly against True or False is error prone: a value in > Python can be false without actually being equal to False. Well, you can always use "is" instead of "==", which makes a comparison to True or False perfectly safe. Regards, Johanne

Re: Modifying Element In For List

2010-11-15 Thread Steven D'Aprano
On Mon, 15 Nov 2010 08:31:52 -0800, octopusgrabbus wrote: > My question concerns elementary list and pass by reference: What does pass-by-reference have to do with Python? Python doesn't use pass-by-reference... if you think it does, you have misunderstood something. Hint: if you think Python

Re: Modifying Element In For List

2010-11-15 Thread Duncan Booth
octopusgrabbus wrote: > I've written a function which is passed a list that contains rows read > from a csv file. The function traverses csv_rows, row by row, and > inspects the first element in each row. The function tests for '', and > if true, replaces that with a 0. > > I've used the standar