Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Luca Menegotto
Il 03/09/2015 17:05, kbtyo ha scritto: I am experimenting with many exception handling and utilizing > continue vs pass. After pouring over a lot of material on SO > and other forums I am still unclear as to the difference when > setting variables and applying functions within multiple "for" >

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 12:12:04 PM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:57 AM, kbtyo wrote: > > I have used CSV and collections. For some reason when I apply this > > algorithm, all of my files are not added (the output is ridiculously small > > considering how much

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:57 AM, kbtyo wrote: > I have used CSV and collections. For some reason when I apply this algorithm, > all of my files are not added (the output is ridiculously small considering > how much goes in - think KB output vs MB input): > > from glob import iglob > import csv >

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Terry Reedy
On 9/3/2015 11:05 AM, kbtyo wrote: I am experimenting with many exception handling and utilizing continue vs pass. 'pass' is a do-nothing place holder. 'continue' and 'break' are jump statements [snip] However, I am uncertain as to how this executes in a context like this: import glob i

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 11:52:16 AM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:38 AM, kbtyo wrote: > > Thank you for the elaboration. So, what I hear you saying is that (citing, > > "In this case, there's no further body, so it's going to be the same as > > "pass" (which >

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:38 AM, kbtyo wrote: > Thank you for the elaboration. So, what I hear you saying is that (citing, > "In this case, there's no further body, so it's going to be the same as > "pass" (which > means "do nothing")") that the else block is not entered. For exma Seems like a c

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 11:27:58 AM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:05 AM, kbtyo wrote: > > However, I am uncertain as to how this executes in a context like this: > > > > import glob > > import csv > > from collections import OrderedDict > > > > interesting_files

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
On Thursday, September 3, 2015 at 11:27:58 AM UTC-4, Chris Angelico wrote: > On Fri, Sep 4, 2015 at 1:05 AM, kbtyo wrote: > > However, I am uncertain as to how this executes in a context like this: > > > > import glob > > import csv > > from collections import OrderedDict > > > > interesting_files

Re: continue vs. pass in this IO reading and writing

2015-09-03 Thread Chris Angelico
On Fri, Sep 4, 2015 at 1:05 AM, kbtyo wrote: > However, I am uncertain as to how this executes in a context like this: > > import glob > import csv > from collections import OrderedDict > > interesting_files = glob.glob("*.csv") > > header_saved = False > with open('merged_output_mod.csv','w') as

continue vs. pass in this IO reading and writing

2015-09-03 Thread kbtyo
Good Morning: I am experimenting with many exception handling and utilizing continue vs pass. After pouring over a lot of material on SO and other forums I am still unclear as to the difference when setting variables and applying functions within multiple "for" loops. Specifically, I understa