extract certain values from file with re

hanumizzle hanumizzle at gmail.com
Sat Oct 7 06:13:30 CEST 2006

On 6 Oct 2006 13:16:13 -0700, Matteo <mahall at ncsa.uiuc.edu> wrote:

> Coming from C++, using exceptions in this way still feels a bit creepy
> to me, but I've been assured that this is very pythonic, and I'm slowly
> adopting this style in my python code.
> Parsing the line can be easy too:
>    (umom,vmom,wmom,mass...) = map(float,vals[1:])

Style question.

Should one consider the map functional deprecated and use [float(val)
for val in vals[1:]] or no? I'm not sure myself.

-- Theerasak

More information about the Python-list mailing list