Skip to content
Snippets Groups Projects
Commit 89c672ecdc6e authored by Sylvain Thenault's avatar Sylvain Thenault
Browse files

use empty tuple instead of None as default value for solutions

parent 6cccc53a9ebe
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@
class ScopeNode(BaseNode):
solutions = None # list of possibles solutions for used variables
solutions = () # list of possibles solutions for used variables
_varmaker = None # variable names generator, built when necessary
where = None # where clause node
......@@ -53,7 +53,7 @@
new.schema = self.schema
if solutions is not None:
new.solutions = solutions
elif copy_solutions and self.solutions is not None:
elif copy_solutions and self.solutions:
new.solutions = deepcopy(self.solutions)
return new
......@@ -386,11 +386,7 @@
return 'Any ' + ' '.join(s)
def copy(self, copy_solutions=True, solutions=None):
new = Select()
if solutions is not None:
new.solutions = solutions
elif copy_solutions and self.solutions is not None:
new.solutions = deepcopy(self.solutions)
new = ScopeNode.copy(self, copy_solutions, solutions)
if self.with_:
new.set_with([sq.copy(new) for sq in self.with_], check=False)
for child in self.selection:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment