[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] QString in PyQt4 - Request for Comments
From:       Mike Tammerman <mtammerman () gmail ! com>
Date:       2005-10-20 10:26:36
Message-ID: e3bbdd440510200326h42ceb9bfq1b74d09114a13ed0 () mail ! gmail ! com
[Download RAW message or body]

I don't know how difficult or feasible it is, but I would suggest
using macros, so people can choose whether to use QString or python
str while compiling pyqt.

Just an idea.
Mike

On 10/18/05, Phil Thompson <phil@riverbankcomputing.co.uk> wrote:
> I'm wondering whether QString should be dropped in PyQt4 in order to make it
> more Pythonic.
>
> At the moment Python strings and unicode strings are automatically converted
> to QStrings when passed as arguments - so there would be no change there. If
> a QString was returned by a method or an operator then a unicode string would
> be returned instead.
>
> Obviously you would lose all of QString's methods and would have to rely on
> what Python gives you for manipulating strings.
>
> One of the limitations of QString has been that you couldn't do...
>
> q = "Py" + QString("Qt")
>
> ...but with current snapshots you can - so this is an argument for keeping
> QString as it has become easier to use.
>
> BTW, the following is a consequence of the additional support...
>
> s = "Py"
> # s is of type str
> s += QString("Qt")
> # s is now of type QString
>
> Comments, opinions welcome.
>
> Phil
>
> _______________________________________________
> PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic