diff options
author | Manu Phatak <bionikspoon@gmail.com> | 2016-01-21 23:49:02 -0600 |
---|---|---|
committer | Manu Phatak <bionikspoon@gmail.com> | 2016-01-21 23:49:02 -0600 |
commit | 59d1e4c402d428b6a25cd1ac3eb8fd3d71b79030 (patch) | |
tree | b761837e702d0959d25b45233560a3fcc6ae81fe /ply | |
parent | d776a2ece6c12bf8f8b6a0e65b48546ac6078765 (diff) | |
download | ply-59d1e4c402d428b6a25cd1ac3eb8fd3d71b79030.tar.gz |
use literal set notation for 2.6 compatibility
this is for the ply optimize flag. it creates the set as `set(('A', 'B', 'C'))` instead of `'{'A', 'B', 'C'}` used in newer python versions.
Diffstat (limited to 'ply')
-rw-r--r-- | ply/lex.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -179,7 +179,7 @@ class Lexer: with open(filename, 'w') as tf: tf.write('# %s.py. This file automatically created by PLY (version %s). Don\'t edit!\n' % (basetabmodule, __version__)) tf.write('_tabversion = %s\n' % repr(__tabversion__)) - tf.write('_lextokens = %s\n' % repr(self.lextokens)) + tf.write('_lextokens = set(%s)\n' % repr(tuple(self.lextokens))) tf.write('_lexreflags = %s\n' % repr(self.lexreflags)) tf.write('_lexliterals = %s\n' % repr(self.lexliterals)) tf.write('_lexstateinfo = %s\n' % repr(self.lexstateinfo)) |