Re: Micro-PEP: str.translate(None) to mean identity translation

2005-04-30 Thread Bengt Richter
On Sat, 30 Apr 2005 08:44:21 GMT, "Raymond Hettinger" <[EMAIL PROTECTED]> wrote: >[Bengt Richter] >> Just thought None as the first argument would be both handy and mnemonic, >> signifying no translation, but allowing easy expression of deleting >characters, >> e.g., >> >>s = s.translate(None,

Re: Micro-PEP: str.translate(None) to mean identity translation

2005-04-30 Thread M.E.Farmer
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 wo

Re: Micro-PEP: str.translate(None) to mean identity translation

2005-04-30 Thread Raymond Hettinger
[Bengt Richter] > Just thought None as the first argument would be both handy and mnemonic, > signifying no translation, but allowing easy expression of deleting characters, > e.g., > >s = s.translate(None, 'badcharshere') Log a feature request on SF and assignment to me. I'll put this in for

Re: Micro-PEP: str.translate(None) to mean identity translation

2005-04-30 Thread Peter Otten
M.E.Farmer wrote: > Bengt Richter wrote: >> Just thought None as the first argument would be both handy and > mnemonic, >> signifying no translation, but allowing easy expression of deleting > characters, >> e.g., >> >>s = s.translate(None, 'badcharshere') >> >> Regards, >> Bengt Richter > >

Re: Micro-PEP: str.translate(None) to mean identity translation

2005-04-30 Thread Bengt Richter
On 29 Apr 2005 21:27:18 -0700, "M.E.Farmer" <[EMAIL PROTECTED]> wrote: >Bengt Richter wrote: >> Just thought None as the first argument would be both handy and >mnemonic, >> signifying no translation, but allowing easy expression of deleting >characters, >> e.g., >> >>s = s.translate(None, 'ba

Re: Micro-PEP: str.translate(None) to mean identity translation

2005-04-29 Thread M.E.Farmer
Bengt Richter wrote: > Just thought None as the first argument would be both handy and mnemonic, > signifying no translation, but allowing easy expression of deleting characters, > e.g., > >s = s.translate(None, 'badcharshere') > > Regards, > Bengt Richter What's wrong with : s = s.replace('b

Re: Micro-PEP: str.translate(None) to mean identity translation

2005-04-29 Thread Michael Spencer
Bengt Richter wrote: Just thought None as the first argument would be both handy and mnemonic, signifying no translation, but allowing easy expression of deleting characters, e.g., s = s.translate(None, 'badcharshere') Regards, Bengt Richter +1 Michael -- http://mail.python.org/mailman/listinfo/

Micro-PEP: str.translate(None) to mean identity translation

2005-04-29 Thread Bengt Richter
Just thought None as the first argument would be both handy and mnemonic, signifying no translation, but allowing easy expression of deleting characters, e.g., s = s.translate(None, 'badcharshere') Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list