Discussion:
[Bitpim-devel] Re: [bitpim-cvs-checkins] bitpim com_samsungscha310.py,1.7,1.8
Roger Binns
2004-11-18 05:33:35 UTC
Permalink
+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

Loading...