~ubuntu-branches/ubuntu/gutsy/libapache2-mod-python/gutsy

« back to all changes in this revision

Viewing changes to lib/python/mod_python/python22.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-07-07 13:18:35 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060707131835-zfp1vupanjj2e77y
Tags: 3.2.8-1ubuntu1
* Merge to Debian unstable.
* Remaining Ubuntu change: debian/{control,rules}: Drop python 2.3 package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 #
 
2
 # Copyright 2004 Apache Software Foundation
 
3
 #
 
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
 
7
 #
 
8
 #      http://www.apache.org/licenses/LICENSE-2.0
 
9
 #
 
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.
 
15
 #
 
16
 # Originally developed by Gregory Trubetskoy.
 
17
 #
 
18
 # $Id: python22.py 374268 2006-02-02 05:31:45Z nlehuen $
 
19
 
 
20
# This file contains a bunch of hacks used to support Python 2.2
 
21
 
 
22
import sys
 
23
if sys.version < '2.3':
 
24
    import __builtin__ as hack
 
25
    
 
26
    # Enumerate does not exists in Python 2.2
 
27
    hack.enumerate = lambda s : zip(xrange(len(s)),s)