How to use the ptype.block function in ptype

To help you get started, we’ve selected a few ptype examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github arizvisa / syringe / lib / ptypes / dyn.py View on Github external
def block(size, **kwds):
    '''
    returns a general block type of the specified size
    '''
    size = int(size)
    assert size >= 0, 'dyn.block(%d): argument cannot be < 0'% (size)
    return clone(ptype.block, length=size)