def _dir(obj, prefix):
    '''Return list of matching attributes, except globals.
    '''
    g = prefix + 'globals'  # sized in modules
    return [a for a in dir(obj) if a.startswith(prefix) and a != g]
Return list of matching attributes, except globals.
    
recipes/Python/544288_Size_of_Python_objects/recipe-544288.py