def alen(obj, **opts):
    '''Return the length of an object (in *items*).

    See function **basicsize** for a description of the options.
    '''
    n = t = _typedefof(obj, **opts)
    if t:
        n = t.alen
        if n and _iscallable(n):
            i, v, n = t.item, t.vari, n(obj)
            if v and i == _sizeof_Cbyte:
                i = getattr(obj, v, i)
                if i > _sizeof_Cbyte:
                    n = n // i
    return n
Return the length of an object (in *items*).

    See function **basicsize** for a description of the options.
    
recipes/Python/546530_Size_of_Python_objects_revised/recipe-546530.py