redbaron
redbaron copied to clipboard
Break & Continue Nodes
Any particular reason why those two nodes weren't implemented?
What would their implementation entail?
Hello,
Those 2 nodes are actually implemented (but I've apparently forgot to document them in the reference page) as you can see:
In [3]: RedBaron("def a():\n break\n continue")[0].value[0].help()
BreakNode()
# identifiers: break, break_, breaknode
In [4]: RedBaron("def a():\n break\n continue")[0].value[1].help()
ContinueNode()
# identifiers: continue, continue_, continuenode
Have you encountered a situation where they weren't or raised a bug?
my bad, I saw these:
https://github.com/PyCQA/redbaron/blob/master/redbaron/nodes.py#L266
and
https://github.com/PyCQA/redbaron/blob/master/redbaron/nodes.py#L146
and I made the assumption that they weren't implemented.
You rock!
Reopened to not forget to add documentation for those.