[PyQt] Where is the "<<" insertion overload done?

David Cortesi davecortesi at gmail.com
Tue Nov 25 05:17:06 GMT 2014


I've been happily using the "<<" insertion operator to write to
QTextStreams for some time now, and only recently realized that "<<" is
binary shift left in standard Python. Well, not so much realized, as had it
rubbed in my face by PyLint, which warns that "stream << string" is an
expression whose value is not being assigned.

Somehow a QTextStream (derived) object arranges an overloaded meaning of
".write()" onto this operator. But where/how is the overload done?

Thanks for any pointers
Dave Cortesi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20141124/4a6ccbc8/attachment.html>


More information about the PyQt mailing list