diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-08-26 12:12:32 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2019-08-26 12:12:32 +0000 |
| commit | d0cbc06ea65c895e43d9c37da6817bbd3fd8a164 (patch) | |
| tree | 39561c6238ffc76b3831a0e995cf4fbd84d5d023 /docutils/tools/dev/create_unimap.py | |
| parent | 295c5bfcada570eed9a44a2a312ad80a84262c55 (diff) | |
| download | docutils-d0cbc06ea65c895e43d9c37da6817bbd3fd8a164.tar.gz | |
py3: Add aliases for removed symbols
Add aliases for symbols that have been removed in Python 3.x, namely
basestring, unicode, unichr and StandardError.
Signed-off-by: Stephen Finucane <stephen@that.guru>
small fixes by Günter Milde.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8348 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/tools/dev/create_unimap.py')
| -rwxr-xr-x | docutils/tools/dev/create_unimap.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docutils/tools/dev/create_unimap.py b/docutils/tools/dev/create_unimap.py index b905f34f0..e08dbea9c 100755 --- a/docutils/tools/dev/create_unimap.py +++ b/docutils/tools/dev/create_unimap.py @@ -14,15 +14,15 @@ from xml.dom import minidom import sys import pprint -if sys.version_info >= (3,0): - unicode = str +if sys.version_info >= (3, 0): + unicode = str #noqa else: - bytes = str - chr = unichr + bytes = str # noqa + chr = unichr # noqa def w(s): - if sys.version_info >= (3,0) and isinstance(s, unicode): + if sys.version_info >= (3, 0) and isinstance(s, unicode): s = s.encode('utf8') sys.stdout.write(s) |
