diff options
author | David Beazley <dave@dabeaz.com> | 2020-01-01 09:51:19 -0600 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2020-01-01 09:51:19 -0600 |
commit | 1321375e013425958ea090b55aecae0a4b7face6 (patch) | |
tree | 9569e16dde14372391142bc0d80ff0f90d72215b /ply/lex.py | |
parent | f6d78006324079bfe824422b9a21dc91811ecfa2 (diff) | |
download | ply-1321375e013425958ea090b55aecae0a4b7face6.tar.gz |
initial year-end cleanup.
Diffstat (limited to 'ply/lex.py')
-rw-r--r-- | ply/lex.py | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -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_]+$') |