summaryrefslogtreecommitdiff
path: root/ply/lex.py
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2020-01-01 09:51:19 -0600
committerDavid Beazley <dave@dabeaz.com>2020-01-01 09:51:19 -0600
commit1321375e013425958ea090b55aecae0a4b7face6 (patch)
tree9569e16dde14372391142bc0d80ff0f90d72215b /ply/lex.py
parentf6d78006324079bfe824422b9a21dc91811ecfa2 (diff)
downloadply-1321375e013425958ea090b55aecae0a4b7face6.tar.gz
initial year-end cleanup.
Diffstat (limited to 'ply/lex.py')
-rw-r--r--ply/lex.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/ply/lex.py b/ply/lex.py
index bc9ed34..39095eb 100644
--- a/ply/lex.py
+++ b/ply/lex.py
@@ -1,7 +1,7 @@
# -----------------------------------------------------------------------------
# ply: lex.py
#
-# Copyright (C) 2001-2019
+# Copyright (C) 2001-2020
# David M. Beazley (Dabeaz LLC)
# All rights reserved.
#
@@ -33,7 +33,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# -----------------------------------------------------------------------------
-__version__ = '3.11'
+__version__ = '4.0'
__tabversion__ = '3.10'
import re
@@ -43,13 +43,8 @@ import copy
import os
import inspect
-# This tuple contains known string types
-try:
- # Python 2.6
- StringTypes = (types.StringType, types.UnicodeType)
-except AttributeError:
- # Python 3.0
- StringTypes = (str, bytes)
+# This tuple contains acceptable string types
+StringTypes = (str, bytes)
# This regular expression is used to match valid token names
_is_identifier = re.compile(r'^[a-zA-Z0-9_]+$')