[PyQt] Type map for python to Qt?

Barry barry at barrys-emacs.org
Sat Feb 4 22:11:47 GMT 2017

> On 4 Feb 2017, at 21:59, Shaheed Haque <srhaque at theiet.org> wrote:
>> On 4 February 2017 at 21:56, Barry <barry at barrys-emacs.org> wrote:
>> > On 4 Feb 2017, at 21:35, Shaheed Haque <srhaque at theiet.org> wrote:
>> >
>> > Hi Barry,
>> >
>> > The tuple API does have a PyTuple_SetItem operation,
>> But that can only be used once to init the tuple. You cannot come back and replace a value.
>> List is the only option if the array can be updated.
> I suspect you may well be right.

Tuples are immutable even in C code.

The setitem function can only be used after you creat the tuple with PyTuple_New.
Once you give a ref to a tuple away you must not attempt to modify by any means as that breaks python assumptions. I do not recall if python with assert on you if you break the rules.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170204/8b8f4994/attachment.html>

More information about the PyQt mailing list