def nl_object_alloc(ops):
    """Allocate a new object of kind specified by the operations handle.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/object.c#L54

    Positional arguments:
    ops -- cache operations handle (nl_object_ops class instance).

    Returns:
    New nl_object class instance or None.
    """
    new = nl_object()
    nl_init_list_head(new.ce_list)
    new.ce_ops = ops
    if ops.oo_constructor:
        ops.oo_constructor(new)
    _LOGGER.debug('Allocated new object 0x%x', id(new))
    return new
def nl_object_alloc ( ops ) : new = nl_object ( ) nl_init_list_head ( new . ce_list ) new . ce_ops = ops if ops . oo_constructor : ops . oo_constructor ( new ) _LOGGER . debug ( 'Allocated new object 0x%x' , id ( new ) ) return new
Allocate a new object of kind specified by the operations handle.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/object.c#L54

    Positional arguments:
    ops -- cache operations handle (nl_object_ops class instance).

    Returns:
    New nl_object class instance or None.