UNIX-style sort in Python?

Michael Hoffman m.h.3.9.1.without.dots.at.cam.ac.uk at example.com
Mon Oct 18 19:33:49 CEST 2004


Andrew Dalke wrote:
> Alex Martelli wrote:
>> lines = [(get_fields(line), line) for line in open("imputfilename")]
> 
> Bah!  I all too often forget that () on the LHS of the list
> comprehension.  :(

Me too. Could the grammar conceivably be changed so that it works 
without the parantheses there?
-- 
Michael Hoffman



More information about the Python-list mailing list