Q: listsort and dictsort - official equivalents?
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue Jun 19 23:05:03 EDT 2007
En Tue, 19 Jun 2007 21:57:30 -0300, BJörn Lindqvist <bjourne at gmail.com>
escribió:
> It's not true that the sort must complete (or that the whole file must
> be read for that matter), Python has cool generators which makes the
> above possible.
That's not possible, the input must be read completely before sorted() can
output anything. Suppose the minimum element is at the end - until you
read it, you can't output the very first sorted element.
--
Gabriel Genellina
More information about the Python-list
mailing list