Mercurial > genshi > genshi-test
comparison genshi/core.py @ 856:1e2be9fb3348
Add a couple of fallback imports for Python 3.0.
author | cmlenz |
---|---|
date | Thu, 12 Nov 2009 11:36:14 +0000 |
parents | 0d9e87c6cf6e |
children | 24733a5854d9 |
comparison
equal
deleted
inserted
replaced
855:9598353ed630 | 856:1e2be9fb3348 |
---|---|
12 # history and logs, available at http://genshi.edgewall.org/log/. | 12 # history and logs, available at http://genshi.edgewall.org/log/. |
13 | 13 |
14 """Core classes for markup processing.""" | 14 """Core classes for markup processing.""" |
15 | 15 |
16 try: | 16 try: |
17 reduce # builtin in Python < 3 | |
18 except NameError: | |
17 from functools import reduce | 19 from functools import reduce |
18 except ImportError: | |
19 pass # builtin in Python <= 2.5 | |
20 from itertools import chain | 20 from itertools import chain |
21 import operator | 21 import operator |
22 | 22 |
23 from genshi.util import plaintext, stripentities, striptags | 23 from genshi.util import plaintext, stripentities, striptags |
24 | 24 |