[PyQt] PyQt5 NULL QVariant

Matthias Kuhn matthias at opengis.ch
Sun May 15 12:28:37 BST 2016


On 15/05/16 11:18, Phil Thompson wrote:
> If you are already able to get away with imposing those restrictions then I'm not going to introduce an incompatibility for everybody else.
Those restrictions are the best we can get so far, but they did lead to
confusion once in a while (which I'd be happy to avoid in the future).

Can you confirm that returning empty string and 0 for NULL is expected
behavior and not seen as a bug?

For us it's a minor issue now but I think that "everybody else" did
write very little code - if any at all - based on this behavior and it
would be very easy to to fix it in a backwards compatible way ( i.e. `if
not var` instead of `if var != 0`).

I'm going to be quiet now :-)

-- Matthias


More information about the PyQt mailing list