Is this supposed to return a boolean value?
>>> win.windowFlags() & QtCore.Qt.WindowStaysOnTopHint
<PyQt4.QtCore.WindowFlags object at 0x7ad0578>
I already knew that
# enable always on top
win.windowFlags() | QtCore.Qt.WindowStaysOnTopHint
# disable it
win.windowFlags() & ~QtCore.Qt.WindowStaysOnTopHint
# toggle it
win.windowFlags() ^ QtCore.Qt.WindowStaysOnTopHint