@contextmanager
def bind(*objs, args=None):
    'Bind all objs (optionally with positional arguments); releases at cleanup'
    if (args is None):
        args = (None for obj in objs)
    for (obj, arg) in zip(objs, args):
        if (arg is not None):
            obj.bind(arg)
        else:
            obj.bind()
    (yield)
    for obj in objs[::(- 1)]:
        obj.release()
Bind all objs (optionally with positional arguments); releases at cleanup
@contextmanager
def bind(*objs, args=None):
    
    if (args is None):
        args = (None for obj in objs)
    for (obj, arg) in zip(objs, args):
        if (arg is not None):
            obj.bind(arg)
        else:
            obj.bind()
    (yield)
    for obj in objs[::(- 1)]:
        obj.release()