Steven D'Aprano <steve-remove-t...@cybersource.com.au> writes: > On Tue, 07 Sep 2010 11:00:45 +1000, Ben Finney wrote: > > > If you're going to use the list of float objects, you can convert them > > all with a list comprehension. > [...] > > >>> numbers_as_float = [float(x) for x in numbers_as_str] > > That's awfully verbose. A map is simpler: > > numbers_as_float = map(float, numbers_as_str)
I'll pay “verbose”, but not “awfully”. There is little difference in verbosity between your example and mine. Further, I don't see my example as excessive, which I assume your “awfully” entails. -- \ “I call him Governor Bush because that's the only political | `\ office he's ever held legally.” —George Carlin, 2008 | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list