[PyKDE] Printing empty QStrings
Phil Thompson
phil at river-bank.demon.co.uk
Fri Nov 3 10:34:07 GMT 2000
Andrew Kuchling wrote:
>
> On Thu, Nov 02, 2000 at 05:50:15PM +0000, Phil Thompson wrote:
> >I'm more and more inclined to go with repr of a null QString and an
> ^^^^
> >empty QString to both return an empty Python string. Generally QString
>
> This is a typo for str, right? repr() is commonly used for debugging
> printouts, so you usually want as much info as possible.
No it's not a typo. At the moment str isn't implemented and falls back
to repr. One of the suggestions I made was to implement str and have
both null and empty QStrings return an empty Python string, and to have
repr return (for a null QString) soemthing like "<null QString at
zzzz>".
Would this be the best compromise, consistent with the rest of Python?
Phil
More information about the PyQt
mailing list