act = QtGui.QAction('Action', self)
act.triggered.connect(self.on_triggered)
act = QtGui.QAction('Action', self, triggered=self.on_triggered)
act = QtGui.QAction('Action', self)
Understanding a piece of python code