pybit/py3/common.py
def to_dict(self,
                keys: list=['hash', 'start',
                            'end', 'blockSize',
                            'version', 'prevHash',
                            'merkleRootHash', 'time',
                            'timestamp', 'nBits',
                            'nonce', 'nTransactions']) -> dict:
        """
        Return object attributes as dict

        Similar to block.__dict__ but gets properties not just attributes.
        """

        # Create output dict
        bd = {}
        for k in keys:
            # Add each attribute with attribute name as key
            bd[k] = getattr(self, k)

        return bd

        Return object attributes as dict

        Similar to block.__dict__ but gets properties not just attributes.
        
Return object attributes as dict
Similar to block.__dict__ but gets properties not just attributes.
Return object attributes as dict Similar to block . __dict__ but gets properties not just attributes .
def to_dict(self,
                keys: list=['hash', 'start',
                            'end', 'blockSize',
                            'version', 'prevHash',
                            'merkleRootHash', 'time',
                            'timestamp', 'nBits',
                            'nonce', 'nTransactions']) -> dict:
        bd = {}
        for k in keys:
            bd[k] = getattr(self, k)
        return bd
def to_dict ( self , keys : list = [ 'hash' , 'start' , 'end' , 'blockSize' , 'version' , 'prevHash' , 'merkleRootHash' , 'time' , 'timestamp' , 'nBits' , 'nonce' , 'nTransactions' ] ) -> dict : bd = { } for k in keys : bd [ k ] = getattr ( self , k ) return bd
Return object attributes as dict
Similar to block.__dict__ but gets properties not just attributes.
Return object attributes as dict Similar to block . __dict__ but gets properties not just attributes .
"""
        Return object attributes as dict

        Similar to block.__dict__ but gets properties not just attributes.
        """ # Create output dict # Add each attribute with attribute name as key
self
keys
list