Metadata-Version: 2.1
Name: dsr
Version: 1.0.0
Summary: Automatically gegerate repr to show data structures espelly trees
Home-page: https://github.com/the0demiurge/DataStructureRepr
Author: Charles Xu
Author-email: charl3s.xu@gmail.com
License: UNKNOWN
Description: # Introduction
        
        
        
        I opened this project to show datastructures by hacking `__repr__` function of Python.
        
        
        
        ## Installation
        
        
        
        `pip install dsr`
        
        
        
        ## Example
        
        
        
        `from dsr import BinaryTreeNode, TreeNode`
        
        
        
        ```python
        
        print('BinaryTreeNode:')
        
        a = BinaryTreeNode(100)
        
        b = BinaryTreeNode(2)
        
        c = BinaryTreeNode(0, a, b)
        
        d = BinaryTreeNode('a', c, c)
        
        a.right = d
        
        a.left = d
        
        
        
        print(d)
        
        print('TreeNode:')
        
        root = TreeNode('tree', [
        
            TreeNode('types', [TreeNode(str), TreeNode(int)]),
        
            TreeNode('values', [TreeNode(1), TreeNode(3.1415926), TreeNode(True)]),
        
            TreeNode('empty'),
        
            2.718281828,
        
            'Not TreeNode'
        
        ])
        
        print(root)
        
        ```
        
        BinaryTreeNode
        
        ```
        
                              ('a')                      
        
                             /     \                     
        
                      (0)                         (0)    
        
                     /   \                       /   \   
        
            (100)         (2)           (100)         (2)
        
           /     \                     /     \           
        
        ...       ...               ...       ...        
        
        ```
        
        TreeNode
        
        ```
        
        ('tree')
        
         ├── ('types')
        
         │    ├── (<class 'str'>)
        
         │    └── (<class 'int'>)
        
         ├── ('values')
        
         │    ├── (1)
        
         │    ├── (3.1415926)
        
         │    └── (True)
        
         ├── ('empty')
        
         ├── 2.718281828
        
         └── 'Not TreeNode'
        
        ```
        
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: Android
Classifier: Operating System :: iOS
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft
Classifier: Operating System :: Other OS
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Description-Content-Type: text/markdown
