Micro-PEP: str.translate(None) to mean identity translation
M.E.Farmer
mefjr75 at hotmail.com
Sat Apr 30 13:12:27 EDT 2005
After I re-read your post in daylight and read your followup the "Aha!"
hit me .I am a little slow at times. I have always just iterated thru
the badchars and replaced with "" . What you suggest would be very
nice indeed!
Thanks for the time and explanation, and you too Peter !
For what it is worth +1 ;)
On another note why is maketrans in the string module....
I was a bit lost finding it the first time should it be builtin?
transtable = "abcdefg".maketrans("qwertyu")
Probably missing something.
M.E.Farmer
More information about the Python-list
mailing list