<div dir="ltr">Il giorno mer 23 apr 2025 alle ore 17:57 Phil Thompson <<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>> ha scritto:<br><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The implementation of the conversion from a Python object is different <br>
in PyQt6 (it just relies on the buffer protocol). I can't remember if <br>
the QByteArray implementations are different between Qt5 and Qt6.<br></blockquote><div><br></div><div>Interesting. I did a quick search and I only found a possibly related change ( <a href="https://codereview.qt-project.org/c/qt/qtbase/+/281289/7">https://codereview.qt-project.org/c/qt/qtbase/+/281289/7</a> ), but I'm not sure it's actually the cause of the involuntary "fix". In any case, it was just curiosity, it's not really important.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I would never use '==' with None anyway. As None is a singleton I always <br>
use 'is'.<br></blockquote><div><br></div><div>I agree, but I created a default attribute set as "uninitialized", that I'd later compare with a possibly new value (something like "if self.someData == newData: return"). Normally, it's obviously more appopriate to use an empty QByteArray as default, but in some cases it may be necessary to know if the attribute has already been initialized, without the need to use another attribute. Right now, I worked around it by using 0 as default, instead of None.</div><div><br></div><div>Thank you again!<br><br></div><div>MaurizioB<br></div><div> </div></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">È difficile avere una convinzione precisa quando si parla delle ragioni del cuore. - "Sostiene Pereira", Antonio Tabucchi<br><a href="http://www.jidesk.net" target="_blank">http://www.jidesk.net</a></div></div>