[PyQt] Type map for python to Qt?

Shaheed Haque srhaque at theiet.org
Sat Feb 4 23:53:41 GMT 2017


Acknowledged. Any thoughts on the union idea?

On 4 Feb 2017 22:12, "Barry" <barry at barrys-emacs.org> wrote:

>
> 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.
>
> Barry
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170204/5b7ac9fa/attachment-0001.html>


More information about the PyQt mailing list