[PyKDE] QString and + operator
phil at riverbankcomputing.co.uk
Thu Apr 14 09:27:36 BST 2005
> I'm making a requirement for a project I'm working on to work with QString
> instead of the built-in type as much as possible. Some will obviously
> complain about this, needing to cast to str() to keep some pythonic spirit
> for concatenation, augmented assignment, etc. I remember seeing in this
> that Phil mentioned supporting the '+' operator for mixed types. I imagine
> the problem is determining what to return. Is there still an interest in
> exposing this?
I thought I had implemented it - must have slipped through the cracks. It
will be in the next snapshot.
q = QString("foo") + QString("bar")
q = QString("foo") + "bar"
...will both work, but...
s = "foo" + QString("bar")
More information about the PyQt