def add_close_action(widget):
 return add_action(widget, N_(u'Close...'), widget.close, hotkeys.CLOSE, hotkeys.QUIT)

def add_close_action ( widget ) : return add_action ( widget , N_ ( u'Close...' ) , widget . close , hotkeys . CLOSE , hotkeys . QUIT )
adds close action and shortcuts to a widget .