Re: Attribute type change problem while using Qt 5.12 / PyQt 5.12.1 and wildcard imports

Kyle Altendorf <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
On 2019-05-01 05:55, Ümit Öztosun wrote:
> Hello,
> 
> I have encountered a weird problem using PyQt 5.12.1 and Qt 5.12. Take
> the following script:
> 
> from PyQt5.QtCore import *
> class A(QObject):
>     flag = True
> a = A()
> print a.flag
> 
> This outputs QCborSimpleType.True. Boolean attribute somehow converted
> to
> a QCborSimpleType. However, just changing the wildcard import corrects
> output:
> 
> from PyQt5.QtCore import QObject
> class A(QObject):
>     flag = True
> a = A()
> print a.flag
> 
> Output is True this time.

What about this?  Maybe check it in both the 'working' and 'non-working' 
scenarios.

    import PyQt5.QtCore
    print(PyQt5.QtCore.True)
    print(PyQt5.QtCore.__all__)

Cheers,
-kyle
_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.