changeset 72:479b7c598a0e

add py2 v py3 str discriminator types
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Dec 2017 13:26:05 -0800
parents 9d55e0299c3f
children 16b3a11db8d2
files tvii/types.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tvii/types.py	Sun Dec 17 13:26:05 2017 -0800
@@ -0,0 +1,10 @@
+"""
+data types
+"""
+
+try:
+    # python2
+    string = (str, basestring)
+except NameError:
+    # python3
+    string = (str,)