Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring: persons_count = collections.defaultdict:
The machinery in Person is of course needed to support the dict. Note how CustomTreeNode() was always followed by setting the person - rings a bell (person belongs to the init's args) NODES is just persons_count.keys() - using iter cause we may have a lot - note the dict is updated on adding and removing an item but no different person is added to the keys of course !
- Loading branch information
Showing
1 changed file
with
17 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters