Re: help understanding class or function

2009-03-05 Thread Rhodri James
Please don't top-post. On Fri, 06 Mar 2009 01:09:48 -, Vincent Davis wrote: I guess I am thinking of it as an operation that I am preforming on a list and not making a new list. Also looking to learn better methods. This is difficult when you are working alone. It is difficult to know

Re: help understanding class or function

2009-03-05 Thread andrew cooke
Vincent Davis wrote: > I guess I am thinking of it as an operation that I am preforming on a list > and not making a new list. Also looking to learn better methods. This is > difficult when you are working alone. It is difficult to know where to > improve. python occupies a strange place. in some

Re: help understanding class or function

2009-03-05 Thread Vincent Davis
I guess I am thinking of it as an operation that I am preforming on a list and not making a new list. Also looking to learn better methods. This is difficult when you are working alone. It is difficult to know where to improve. The actual functions I am making are more complicated than this example

Re: help understanding class or function

2009-03-05 Thread Gabriel Genellina
En Thu, 05 Mar 2009 14:43:12 -0200, Vincent Davis escribió: If I have a list and I what to make changes to it.a = [1,2,3,4,5,6,7,8,9] and maybe I want to drop the odd and double the even numbers and I will need to do this repeatedly. How is this best done? That is as a function or class. All

help understanding class or function

2009-03-05 Thread Vincent Davis
If I have a list and I what to make changes to it.a = [1,2,3,4,5,6,7,8,9] and maybe I want to drop the odd and double the even numbers and I will need to do this repeatedly. How is this best done? That is as a function or class. All I know how to do is def doubleeven(alist): blist = [2*x for