[PyKDE] QString in PyQt4 - Request for Comments
Simon Edwards
simon at simonzone.com
Tue Oct 18 22:08:43 BST 2005
On Tuesday 18 October 2005 22:42, Giovanni Bajo wrote:
> Simon Edwards <simon at simonzone.com> wrote:
>
> >> Would it mean that QString content would always be copied when used in
> >> Python ? If yes, copying a QString from a widget to another (for example
> >> widget1.setCaption( widget2.caption() ) ) would lead to an unnecessary
> >> copy.
> >
> > True, but how often do you copy a string from one widget to another? I'm
> > guessing almost never (never= not often enough to worry about, or be
> > performance critical).
>
> I'm not saying it happens often. I'm saying that we the proposed change it
> would be *impossible* to do it. On the other hand, with the current
> interface it is possible to do exactly what you want, it is just a little
> less convenient for the common case.
What I am saying is how cares if it impossible to do, performance is not an
issue here. Making the common case work easily, bug free and as expected, is
about a million times more important.
> > The whole "add str()" thing is a pain
> > in the ass and leads to subtle bugs (espically when you use strings as
> keys
> > in dictionaries).
> This is an orthogonal issue, and I admit that it can get annoying pretty
> fast.
I still haven't seen a good argument for keeping QString around. out you go!
cheers,
--
Simon Edwards | Guarddog Firewall
simon at simonzone.com | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."
More information about the PyQt
mailing list