diff options
author | Robert Brewer <fumanchu@aminus.org> | 2009-06-02 06:18:46 +0000 |
---|---|---|
committer | Robert Brewer <fumanchu@aminus.org> | 2009-06-02 06:18:46 +0000 |
commit | 24eeeaa5f4564b624e71474db8ac88dda4def909 (patch) | |
tree | 20287f051a0be071e379fc92e1dfe212711e6afe /cherrypy/py3util.py | |
parent | 0e9ba795eaa87227ee6dae164a32286740c185ae (diff) | |
download | cherrypy-git-24eeeaa5f4564b624e71474db8ac88dda4def909.tar.gz |
trunk: A bunch more alignments between trunk and python3 syntax.
Diffstat (limited to 'cherrypy/py3util.py')
-rw-r--r-- | cherrypy/py3util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cherrypy/py3util.py b/cherrypy/py3util.py index 4b89beb8..ed35c1a6 100644 --- a/cherrypy/py3util.py +++ b/cherrypy/py3util.py @@ -15,3 +15,11 @@ try: except ImportError: from StringIO import StringIO +def sorted(lst): + newlst = list(lst) + newlst.sort() + return newlst + +def reversed(lst): + newlst = list(lst) + return iter(newlst[::-1]) |