Re: Last value of yield statement

2007-10-10 Thread Paul Hankin
On Oct 10, 11:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > Hello all, > > Let us say I have a function like this: > > def efficientFiller(file): > worthless_list = [] > pot_file = open(file,'r') > pot_file_text = pot_file.readlines() > for line in pot_file_text: >

Re: Last value of yield statement

2007-10-10 Thread Shriphani
On Oct 10, 4:05 pm, John Machin <[EMAIL PROTECTED]> wrote: > On 10/10/2007 8:19 PM, Shriphani wrote: > > > > > Hello all, > > > Let us say I have a function like this: > > > def efficientFiller(file): > > worthless_list = [] > > pot_file = open(file,'r') > > pot_file_text =

Re: Last value of yield statement

2007-10-10 Thread John Machin
On 10/10/2007 8:19 PM, Shriphani wrote: > Hello all, > > Let us say I have a function like this: > > def efficientFiller(file): > worthless_list = [] > pot_file = open(file,'r') > pot_file_text = pot_file.readlines() > for line in pot_file_text: > i

Re: Last value of yield statement

2007-10-10 Thread Amit Khemka
On 10/10/07, Shriphani <[EMAIL PROTECTED]> wrote: > On Oct 10, 3:34 pm, Dustan <[EMAIL PROTECTED]> wrote: > > On Oct 10, 5:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > > > > > Hello all, > > > > > Let us say I have a function like this: > > > > > def efficientFiller(file): > > > > Note that you ar

Re: Last value of yield statement

2007-10-10 Thread Shriphani
On Oct 10, 3:34 pm, Dustan <[EMAIL PROTECTED]> wrote: > On Oct 10, 5:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > > > Hello all, > > > Let us say I have a function like this: > > > def efficientFiller(file): > > Note that you are shadowing the built-in variable 'file' here. Better > use 'filename'

Re: Last value of yield statement

2007-10-10 Thread Dustan
On Oct 10, 5:19 am, Shriphani <[EMAIL PROTECTED]> wrote: > Hello all, > > Let us say I have a function like this: > > def efficientFiller(file): Note that you are shadowing the built-in variable 'file' here. Better use 'filename', or something to that effect. > worthless_list = [] >