4 ms·
What about these magic string: "slouching_alert(QString, QString)"? I don't know Python. Does it work by reflection? I assume these are some kind of bindings to
by V-2 11y ago
What about these magic string: "slouching_alert(QString, QString)"? I don't know Python. Does it work by reflection? I assume these are some kind of bindings to an underlying native API or something? It doesn't look very maintainable...
- zb 11y agoNothing to do with Python, it looks like a Qt thing. Not much the author can do about that.
- mkempe 11y agoQt uses slots and signals to control messaging between threads (e.g. the UI and the workers). The Python binding to Qt is good, but it is auto-generated (from C++) and some of it shows up as non-Pythonic mechanisms or conventions.
- amyjess 11y agoNewer versions of PyQt have replaced the magic strings with a system that's much more Pythonic, using decorators and OOP. I guess the author just wanted to keep backwards compatibility with old versions (or isn't aware of the change). Edit: If anyone's interested, here's the new syntax: http://pyqt.sourceforge.net/Docs/PyQt4/new_style_signals_slots.html http://pyqt.sourceforge.net/Docs/PyQt4/new_style_signals_slo...