From 59eb1ab6c2b4b3b70270530171e1032e8e7b62d9 Mon Sep 17 00:00:00 2001 From: grubert Date: Thu, 7 Jul 2011 19:01:56 +0000 Subject: [PATCH] Add function reversed for python < 2.4 git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk@7084 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/docutils/math/math2html.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docutils/docutils/math/math2html.py b/docutils/docutils/math/math2html.py index 44a124234..6e18b40d1 100644 --- a/docutils/docutils/math/math2html.py +++ b/docutils/docutils/math/math2html.py @@ -25,6 +25,14 @@ import sys +if sys.version_info < (2,4): + def reversed(sequence): + i = len(sequence) + while i > 0: + i = i - 1 + yield sequence[i] + + class Trace(object): "A tracing class" -- 2.11.4.GIT