emilydolson / python-red-black-trees

Red-black tree implementation in Python
Other
20 stars 5 forks source link

Rename item to key and make private #5

Closed Beakerboy closed 1 year ago

Beakerboy commented 1 year ago

I created the Node.get_key() method in an earlier PR. For consistency, I renamed Node.item to Node._key, making it private. This way, users would not be able to change the key of a Node object after it has been created.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (ffa2542) 100.00% compared to head (40015c9) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #5 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 1 1 Lines 324 322 -2 ========================================= - Hits 324 322 -2 ``` | [Impacted Files](https://codecov.io/gh/emilydolson/python-red-black-trees/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Emily+Dolson) | Coverage Δ | | |---|---|---| | [src/rbtree.py](https://codecov.io/gh/emilydolson/python-red-black-trees/pull/5?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Emily+Dolson#diff-c3JjL3JidHJlZS5weQ==) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Emily+Dolson). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Emily+Dolson)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.