Yes. Ideally a string would always just be a string; a string should 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 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 écrit :

I'm wondering whether QString should be dropped in PyQt4 in order to make
it more Pythonic.

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).

The only place that copying might be an issue is in something like Qt's XML parser. Otherwise I say drop QString. 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).

cheers,

--
Simon Edwards             | Guarddog Firewall
[EMAIL PROTECTED]       | http://www.simonzone.com/software/
Nijmegen, The Netherlands | "ZooTV? You made the right choice."

_______________________________________________
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

Reply via email to