2
# Copyright 2004 Apache Software Foundation
4
# Licensed under the Apache License, Version 2.0 (the "License"); you
5
# may not use this file except in compliance with the License. You
6
# may obtain a copy of the License at
8
# http://www.apache.org/licenses/LICENSE-2.0
10
# Unless required by applicable law or agreed to in writing, software
11
# distributed under the License is distributed on an "AS IS" BASIS,
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13
# implied. See the License for the specific language governing
14
# permissions and limitations under the License.
16
# Originally developed by Gregory Trubetskoy.
18
# $Id: python22.py 374268 2006-02-02 05:31:45Z nlehuen $
20
# This file contains a bunch of hacks used to support Python 2.2
23
if sys.version < '2.3':
24
import __builtin__ as hack
26
# Enumerate does not exists in Python 2.2
27
hack.enumerate = lambda s : zip(xrange(len(s)),s)