Merge lp:~wallyworld/storm/support-recursive-with into lp:~launchpad-committers/storm/lp
Proposed by
Ian Booth
Status: | Approved |
---|---|
Approved by: | Ian Booth |
Approved revision: | 399 |
Proposed branch: | lp:~wallyworld/storm/support-recursive-with |
Merge into: | lp:~launchpad-committers/storm/lp |
Diff against target: |
66 lines (+25/-3) 3 files modified
NEWS (+1/-0) storm/expr.py (+10/-3) tests/expr.py (+14/-0) |
To merge this branch: | bzr merge lp:~wallyworld/storm/support-recursive-with |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Free Ekanayaka (community) | Approve | ||
Launchpad Committers | Pending | ||
Review via email: mp+74327@code.launchpad.net |
Commit message
Extend WITH expression to support recursion.
Description of the change
This branch extends with WITH expression to support recursion.
== Implementation ==
Add a new recursive attribute to With and change it's compiler to support it.
== Tests ==
There were no tests for With so I added some:
expr.test_with()
expr.
To post a comment you must log in.
Looks good to me with the 2 points below fixed. +1
[1]
+ def __init__(self, name, select, **kwargs):
Any particular reason for not writing this as:
+ def __init__(self, name, select, recursive=False):
?
It feels more explicit to me.
[2]
Please document the new recursive parameter in the class docstring, like:
class With(Expr):
"""Compiles to a simple (name AS expr) used in constructing WITH clauses.
@param recursive: <description>
"""
and add a note about it in the NEWS file.