Binarytree

Latest version: v6.5.1

Safety actively analyzes 628969 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

6.0.0

* Added support for [Graphviz](https://graphviz.org) and [Jupyter Notebooks](https://jupyter.org) ([documentation](https://binarytree.readthedocs.io/en/main/graphviz.html)).
* Moved CI/CD from TravisCI to Github Actions.
* Dropped support for Python 2.7 and 3.5
* Added type hinting with full mypy compliance

5.1.0

* Added [get_parent](https://binarytree.readthedocs.io/en/latest/specs.html#function-binarytree-get-parent) method.

5.0.0

* Changed `Node.value` to `Node.val` to play nicely with leetcode. `Node.value` should still work for the most part, but it is kept only for backward compatibility and will be removed in the future.
* Added support for Python 3.8.
* Minor refactors for inorder, preorder, and postorder traversals.

4.1.0

* Added new property `is_symmetric`.
* Python 3.7 is now officially supported.

4.0.0

* Binarytree version 3.0.0 silently placed a restriction allowing only integers as node values. This was to avoid edge cases that couldn't be handled gracefully (e.g. user-supplied values without random generation or comparison). Pretty printing the tree was also an issue when the `__repr__` of these custom values were too lengthy (tree rendering would break). There were many other technical issues with accepting custom values (which, by the way, is why `binarytree.setup` function was removed). Hopefully in the future, all these challenges are solved so `binarytree.setup` method can be added back again. In the meantime, integers were thought to be enough for the purpose of practicing tree algorithms. But the restriction seemed unnecessarily strong, which is why in this version, support for all number types (e.g. int, float, decimal.Decimal) have been added back.

* Refactored exception names and messages for consistency and clarity.
* `Node.__iter__` now yields node instances instead of node values (see [here](http://binarytree.readthedocs.io/en/master/specs.html#binarytree.Node.__iter__) for details).
* Added new method `Node.values`, which returns the [list representation](https://en.wikipedia.org/wiki/Binary_tree#Arrays) of the binary tree (i.e. node values in [level order](https://en.wikipedia.org/wiki/Tree_traversal#Breadth-first_search)). This is essentially the replacement for the old `Node.__iter__` (see [here](http://binarytree.readthedocs.io/en/master/specs.html#binarytree.Node.values) for details).

3.0.1

* Add MANIFEST.ini to include LICENSE in the distribution.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.