LINUX.ORG.RU

История изменений

Исправление grazor, (текущая версия) :

>>> class QDropEvent:
...     pass
... 
>>> class QDragMoveEvent(QDropEvent):
...     pass
... 
>>> drop = QDropEvent()
>>> drag = QDragMoveEvent()
>>> 
>>> isinstance(drag, QDropEvent)
True
>>> isinstance(drag, QDragMoveEvent)
True
>>> isinstance(drop, QDropEvent)
True
>>> isinstance(drop, QDragMoveEvent)
False
>>> 
>>> isinstance(drop, QDropEvent) and not isinstance(drop, QDragMoveEvent)
True

Исходная версия grazor, :

>>> class QDropEvent:
...     pass
... 
>>> class QDragMoveEvent(QDropEvent):
...     pass
... 
>>> drop = QDropEvent()
>>> drag = QDragMoveEvent()
>>> 
>>> isinstance(drag, QDropEvent)
True
>>> isinstance(drag, QDragMoveEvent)
True
>>> isinstance(drop, QDropEvent)
True
>>> isinstance(drop, QDragMoveEvent)
False