d***@netzero.com
2004-11-18 06:13:27 UTC
Roger, thanks for pointer, I'll update those code sections. I read that the string module provides better performance than string object methods, and I'm all for speed!! :-)
-Joe Pham
name=pb_entry['names'][0]['full'].replace('"', '')
It may not be immediately apparent in Python, but strings are immutable (ie
can't be changed). All the operations listed (split, strip, join etc)
return new strings and do not modify themselves in place.
In fact there is never any need to use the string module, and it is going
to be removed soon.
Roger
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Bitpim-devel mailing list
Bitpim-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
________________________________________________________________
NetZero Platinum $9.95.
NetZero HiSpeed $14.95.
Sign up Today at http://www.netzero.net or
Visit Sam Goody, Suncoast or MediaPlay Stores.
-Joe Pham
+from string import split,atoi,strip,join,replace
BTW that is really bad form in Python.+ name=replace(pb_entry['names'][0]['full'], '"', '')
All you do is:name=pb_entry['names'][0]['full'].replace('"', '')
It may not be immediately apparent in Python, but strings are immutable (ie
can't be changed). All the operations listed (split, strip, join etc)
return new strings and do not modify themselves in place.
In fact there is never any need to use the string module, and it is going
to be removed soon.
Roger
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Bitpim-devel mailing list
Bitpim-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
________________________________________________________________
NetZero Platinum $9.95.
NetZero HiSpeed $14.95.
Sign up Today at http://www.netzero.net or
Visit Sam Goody, Suncoast or MediaPlay Stores.