pybit/Examples/Py3_Export.py
def to_dict(block,
            keys=['hash', 'start', 'end', 'blockSize', 'version', 'prevHash',
                  'merkleRootHash', 'time', 'timestamp', 'nBits', 'nonce',
                  'nTransactions']):
    """
    Return block 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(block, k)

    return bd

    Return block attributes as dict

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

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