Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RQL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
RQL
Commits
89c672ecdc6e
Commit
89c672ecdc6e
authored
16 years ago
by
Sylvain Thenault
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stmts.py
+3
-7
3 additions, 7 deletions
stmts.py
with
3 additions
and
7 deletions
stmts.py
+
3
−
7
View file @
89c672ec
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment