"Pedro Werneck" > > What about this ? > > > # > if sys.version_info >= (2,4): > def sorted(iterable, *args, **kwds): > seq = list(iterable) > seq.sort(*args, **kwds) > return seq > # > > It worked against the TestSorted in lib/test/test_builtins.py
The key= and reverse= parameters were introduced to list.sort() in Py2.4. Consequently, the above code won't provide the desired functionality in Py2.3 and prior. Raymond Hettinger -- http://mail.python.org/mailman/listinfo/python-list