[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Update on QStrings and PyQt4
From: "Phil Thompson" <phil () riverbankcomputing ! co ! uk>
Date: 2005-10-25 13:05:39
Message-ID: 32774.194.203.13.71.1130245539.squirrel () river-bank ! demon ! co ! uk
[Download RAW message or body]
> Phil Thompson <phil@riverbankcomputing.co.uk> wrote:
>
>> A lot of interoperability improvements have been made in current PyQt3
>> snapshots. I've just implemented the buffer interface for QString and
>> the
>> following now work:
>>
>> f = open(QString("Qt"), "r") "foobar".find(QString("bar"))
>> "fooxxx".replace(QString("xxx", QString("bar"))
>>
>> I've already mentioned that the following also now work:
>>
>> s = "Py" + QString("Qt")
>> s = "Py"; s += QString("Qt")
>>
>> Unfortunately, this still doesn't work:
>>
>> QString("foo") in "foobar"
>>
>> I think this is actually a feature/bug in Python - for this operation,
>> unlike other methods like find(), replace() etc., the buffer interface
>> isn't used for some reason. I don't know if other string operations have
>> a
>> similar problem.
>
> Well, this is good news (especially if you're going to make a SIP/PyQt3
> release with this feature), since it's very handy.
> As for the "in" operator, did you report this to the python-dev list?
> Maybe
> it's just a bug and can get fixed.
I'm working on a patch at the moment (with Guido's blessing so it should
go in). If it works Ok then I will go the duck typing route - and it would
also go into PyQt3.
I'll make the patch available for people to play with.
Phil
_______________________________________________
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