From 906a678735be60cd88b79b55a0d9e180ee61af53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Wobst?= Date: Sat, 16 Jul 2011 02:16:07 +0000 Subject: [PATCH] add sorted to pycompat git-svn-id: https://pyx.svn.sourceforge.net/svnroot/pyx/trunk/pyx@3212 069f4177-920e-0410-937b-c2a4a81bcd90 --- pyx/pycompat.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyx/pycompat.py b/pyx/pycompat.py index 957bae8d..3eaa0a8a 100644 --- a/pyx/pycompat.py +++ b/pyx/pycompat.py @@ -91,3 +91,12 @@ try: except NameError: # Python 2.3 from sets import Set as set + +try: + sorted = sorted +except NameError: + # Python 2.3 + def sorted(l): + l = list(l) + l.sort() + return l -- 2.11.4.GIT