Avoid nasty side effects in creation of Node

This issue led to bugs in Jedi, because Jedi used the nodes in a wrong way.
This commit is contained in:
Dave Halter
2019-01-01 23:35:20 +01:00
parent 29325d3052
commit c7c464e5e9
5 changed files with 16 additions and 9 deletions

View File

@@ -186,7 +186,7 @@ class Grammar(object):
return normalizer.issues
def __repr__(self):
nonterminals = self._pgen_grammar._nonterminal_to_dfas.keys()
nonterminals = self._pgen_grammar.nonterminal_to_dfas.keys()
txt = ' '.join(list(nonterminals)[:3]) + ' ...'
return '<%s:%s>' % (self.__class__.__name__, txt)