Re: scoping problem with list comprehension // learning Python

2009-05-21 Thread Diez B. Roggisch
Adrian Dragulescu schrieb: I just started to learn python (first posting to the list). I have a list of dates as strings that I want to convert to a list of datetime objects. Here is my debugging session from inside a method. (Pdb) formatIndex '%Y-%m-%d' (Pdb) [datetime.strptime(i, formatI

Re: scoping problem with list comprehension // learning Python

2009-05-20 Thread Benjamin Peterson
Adrian Dragulescu eskimo.com> writes: > > > I just started to learn python (first posting to the list). > > I have a list of dates as strings that I want to convert to a > list of datetime objects. Here is my debugging session from inside a > method. > > (Pdb) formatIndex > '%Y-%m-%d' > (

scoping problem with list comprehension // learning Python

2009-05-20 Thread Adrian Dragulescu
I just started to learn python (first posting to the list). I have a list of dates as strings that I want to convert to a list of datetime objects. Here is my debugging session from inside a method. (Pdb) formatIndex '%Y-%m-%d' (Pdb) [datetime.strptime(i, formatIndex) for i in self.index[0