Re: Dictionary instantiation?

2007-12-09 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Fri, 07 Dec 2007 11:56:14 +0100, Bruno Desthuilliers wrote: > > >>Also, modifying a sequence in place while iterating over it is a *very* >>bad idea. > > > That's somewhat of an exaggeration, surely. Somewhat of a shortcut if you want - given the context, I obvio

Re: Dictionary instantiation?

2007-12-07 Thread Steven D'Aprano
On Fri, 07 Dec 2007 11:56:14 +0100, Bruno Desthuilliers wrote: > Also, modifying a sequence in place while iterating over it is a *very* > bad idea. That's somewhat of an exaggeration, surely. Some sorts of modifications are more error-prone than others, and deserves your warning e.g. inserting

Re: [NEWB] Dictionary instantiation?

2007-12-07 Thread Shane Geiger
#!/usr/bin/python """ EXAMPLE USAGE OF PYTHON'S CSV.DICTREADER FOR PEOPLE NEW TO PYTHON Python - Batteries Included(tm) This file will demonstrate that when you use the python CSV module, you don't have to remove the newline characters, as between "acorp_ Ac" and "orp Foundation" and other parts

Re: Dictionary instantiation?

2007-12-07 Thread Tim Golden
Matt_D wrote: [... snip loads ...] > Wow, list spam. Indeed. > Sorry about this. Good. > Anyway, disregard my last two. I get it now. Glad to hear it. Might I suggest, though, that it's not necessary to repeat the entire history of the thread on every email. Unless you have reason to repr

Re: Dictionary instantiation?

2007-12-07 Thread Bruno Desthuilliers
Matt_D a écrit : (snip whole posts) Please Matt do the world a favour : don't repost the whole damn think just to add a couple lines !-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Dictionary instantiation?

2007-12-07 Thread Bruno Desthuilliers
Matt_D a écrit : (snip) > Another newb question, same project: > > #Fetch author names > def rem_blank_authors(): #Function to remove entries with '' in the > AUTHOR field of the .csv > csv_list = list(csv_file) #Convert the open file to list format > for e-z mode editing > for row in csv_

Re: Dictionary instantiation?

2007-12-07 Thread Matt_D
On Dec 7, 12:33 pm, Matt_D <[EMAIL PROTECTED]> wrote: > On Dec 7, 12:27 pm, Matt_D <[EMAIL PROTECTED]> wrote: > > > > > On Dec 7, 11:42 am, Virgil Dupras <[EMAIL PROTECTED]> > > wrote: > > > > On Dec 7, 9:05 am, Matt_D <[EMAIL PROTECTED]> wrote: > > > > > Hello there, this is my first post to the l

Re: Dictionary instantiation?

2007-12-07 Thread Matt_D
On Dec 7, 12:27 pm, Matt_D <[EMAIL PROTECTED]> wrote: > On Dec 7, 11:42 am, Virgil Dupras <[EMAIL PROTECTED]> > wrote: > > > > > On Dec 7, 9:05 am, Matt_D <[EMAIL PROTECTED]> wrote: > > > > Hello there, this is my first post to the list. Only been working with > > > Python for a few days. Basically

Re: Dictionary instantiation?

2007-12-07 Thread Matt_D
On Dec 7, 11:42 am, Virgil Dupras <[EMAIL PROTECTED]> wrote: > On Dec 7, 9:05 am, Matt_D <[EMAIL PROTECTED]> wrote: > > > > > Hello there, this is my first post to the list. Only been working with > > Python for a few days. Basically a complete newbie to programming. > > > I'm working with csv modu

Re: [NEWB] Dictionary instantiation?

2007-12-07 Thread Bruno Desthuilliers
Matt_D a écrit : > Hello there, this is my first post to the list. Only been working with > Python for a few days. Basically a complete newbie to programming. > > I'm working with csv module as an exercise to parse out a spreadsheet > I use for work.(I am an editor for a military journalism unit)

Re: Dictionary instantiation?

2007-12-07 Thread Virgil Dupras
On Dec 7, 9:05 am, Matt_D <[EMAIL PROTECTED]> wrote: > Hello there, this is my first post to the list. Only been working with > Python for a few days. Basically a complete newbie to programming. > > I'm working with csv module as an exercise to parse out a spreadsheet > I use for work.(I am an edit

[NEWB] Dictionary instantiation?

2007-12-07 Thread Matt_D
Hello there, this is my first post to the list. Only been working with Python for a few days. Basically a complete newbie to programming. I'm working with csv module as an exercise to parse out a spreadsheet I use for work.(I am an editor for a military journalism unit) Not trying to do anything u