[Pksampler-devel] Re: [PyKDE] QString in PyQt4 - Request for Comments
Status: Beta
Brought to you by:
patrickkidd
From: Patrick S. <pat...@gc...> - 2005-10-18 19:59:13
|
Yes. Ideally a string would always just be a string; a string should =20 not be a string and this other thing, too. A list should be a list, not a list and a list that can only hold =20 this other thing, too. On Oct 18, 2005, at 11:53 AM, Simon Edwards wrote: > On Tuesday 18 October 2005 20:01, Yann Cointepas wrote: > >> Le Mardi 18 Octobre 2005 19:24, Phil Thompson a =E9crit : >> >>> I'm wondering whether QString should be dropped in PyQt4 in order =20= >>> to make >>> it more Pythonic. >>> >> Would it mean that QString content would always be copied when =20 >> used in >> Python ? If yes, copying a QString from a widget to another (for =20 >> example >> widget1.setCaption( widget2.caption() ) ) would lead to an =20 >> unnecessary copy. >> > > True, but how often do you copy a string from one widget to =20 > another? I'm > guessing almost never (never=3D not often enough to worry about, or be > performance critical). > > The only place that copying might be an issue is in something like =20 > Qt's XML > parser. Otherwise I say drop QString. The whole "add str()" thing =20 > is a pain > in the ass and leads to subtle bugs (espically when you use strings =20= > as keys > in dictionaries). > > cheers, > > --=20 > Simon Edwards | Guarddog Firewall > si...@si... | http://www.simonzone.com/software/ > Nijmegen, The Netherlands | "ZooTV? You made the right choice." > > _______________________________________________ > PyKDE mailing list Py...@ma... > http://mats.imk.fraunhofer.de/mailman/listinfo/pykde > |