> In Perl, sort is a function, not some Object Oriented thing. It returns
> the sorted result as another list. This is very simple and nice.

And sometimes exteremely stupid - if your list is large, and making a 
copy just form sorting it (when you don't have to keep a referenece to 
the old list) is highly inefficient.

Calling this stupid tells us just a little bit more of your total lack 
of programming fundamentals.

Not to mention that writing a helper function

def sorted(l):
     l = l[:]
     l.sort()
     return l

to have sorted in versions below 2.4 isn't exactly "magic." But hey, 
we're talking about Xah Lee, a guy who believes his hair could have 
saved the world [1]....


Diez

[1] http://xahlee.org/PageTwo_dir/Personal_dir/mi_pixra.html
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to