From f4206657bafa3efe470cfdba4d0ed727887610ce 2020-06-05 18:16:45 From: Matthias Bussonnier Date: 2020-06-05 18:16:45 Subject: [PATCH] Add comments to explain the lambda: See #12355 --- diff --git a/IPython/terminal/pt_inputhooks/qt.py b/IPython/terminal/pt_inputhooks/qt.py index 9f5e1b4..cdadfff 100644 --- a/IPython/terminal/pt_inputhooks/qt.py +++ b/IPython/terminal/pt_inputhooks/qt.py @@ -45,6 +45,8 @@ def inputhook(context): QtCore.QSocketNotifier.Read) try: # connect the callback we care about before we turn it on + # lambda is necessary as PyQT inspect the function signature to know + # what arguments to pass to. See https://github.com/ipython/ipython/pull/12355 notifier.activated.connect(lambda: event_loop.exit()) notifier.setEnabled(True) # only start the event loop we are not already flipped