diff --git a/CHANGELOG b/CHANGELOG index 8c3decc..95a2a28 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ - Changes to make failures in commutative operators commutative too - Added new optimization to remove useless joins - Correct optimization over selection and product +- Fix Python code generator to correctly escape strings 2.4 - Improve error reporting diff --git a/relational/parser.py b/relational/parser.py index 187cb8d..c852cfb 100644 --- a/relational/parser.py +++ b/relational/parser.py @@ -194,7 +194,7 @@ class Node (object): prop = '{\"%s\"}' % prop.replace( ',', '\",\"').replace(ARROW, '\":\"').replace(' ', '') else: # Selection - prop = '\"%s\"' % prop + prop = repr(prop) return '%s.%s(%s)' % (self.child.toPython(), op_functions[self.name], prop) return self.name