Cluster.traverse says breadth-first but looks like depth-first
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
This documentation for this method says traversal is breadth-first, but it looks like depth-first to me
def traverse(self, visit=lambda cluster: None):
""" Calls the given visit() function on this cluster and each nested cluster, breadth-first.
"""
visit(self)
for item in self:
if isinstance(item, Cluster):
item.traverse(visit)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Cluster.traverse method shown in the issue and verify the traversal order against its docstring. Update the documentation so it accurately describes the confirmed behavior; the work is done when the breadth-first or depth-first wording is no longer misleading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100