def delete_all(obj):
    '''Calls `delete()` on all members of `obj` that are recognized as
    instances of `pg` objects.'''
    types = tuple([
        Shader,
        Mesh,
        VertexBuffer,
        IndexBuffer,
        Texture,
        Program,
        Context,
    ])
    for name in dir(obj):
        child = getattr(obj, name)
        if isinstance(child, types):
            child.delete()
def delete_all ( obj ) : types = tuple ( [ Shader , Mesh , VertexBuffer , IndexBuffer , Texture , Program , Context , ] ) for name in dir ( obj ) : child = getattr ( obj , name ) if isinstance ( child , types ) : child . delete ( )
Calls `delete()` on all members of `obj` that are recognized as
    instances of `pg` objects.