sorted (WAS: lambda)
Thu Jan 13 14:18:17 EST 2005
"Fredrik Lundh" <fredrik at pythonware.com> writes:
> > Oh, same difference. I thought it was a method because I'm not using
> > 2.4 yet. The result is the same
> nope. sorted works on any kind of sequence, including forward-only
> iterators. sorted(open(filename)) works just fine, for example.
Oh cool. However I meant the result is the same in my example, where
assigning the temporary result to a variable stopped memory from
getting reclaimed until after the function exits.
More information about the Python-list