aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/doc
diff options
context:
space:
mode:
authorBoxiang Sun <daetalusun@gmail.com>2018-04-28 10:29:30 +0800
committerBoxiang Sun <daetalusun@gmail.com>2018-04-30 11:09:09 +0000
commitaadfb8afc9d7f9ae00bdb53b72e39ff0b2bebe6d (patch)
tree10efa772dd6d4814279b97c9f0dc3349fd9a9fcb /sources/pyside2/doc
parenta245785dd9d0f1088aa95ca8890eaeab4bdc1432 (diff)
Implement Python slicing support for QByteArray
PySide2 for Python 3 didn't support get item by slice, e.g. ``` >>> from PySide2.QtCore import QByteArray >>> ba = QByteArray('1234567890') >>> ba[2:4] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: sequence index must be integer, not 'slice' ``` This is because get item by slice is supported by mp_subscript. But current PySide2 doesn't implemented it. So I added __mgetitem__ in QByteArray. And we also need to keep __getitem__ to support iterate over QByteArray. Also removed the __getslice__ from QByteArray. Task-number: PYSIDE-567 Change-Id: I01f79cc2ab8700da92155cfad96be2e98bb8b331 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/doc')
0 files changed, 0 insertions, 0 deletions