diff options
Diffstat (limited to 'src/zope/i18n/_compat.py')
-rw-r--r-- | src/zope/i18n/_compat.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/zope/i18n/_compat.py b/src/zope/i18n/_compat.py new file mode 100644 index 0000000..f6bf93b --- /dev/null +++ b/src/zope/i18n/_compat.py @@ -0,0 +1,8 @@ +# This gives a linting error because unicode is not defined on Python 3: +# text_type = str if bytes is not str else unicode +try: + # Python 2 + text_type = unicode +except NameError: + # Python 3 + text_type = str |