Re: Micro-PEP: str.translate(None) to mean identity translation
- From: Michael Spencer <mahs@xxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 18:50:18 -0700
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
.
- References:
- Micro-PEP: str.translate(None) to mean identity translation
- From: Bengt Richter
- Micro-PEP: str.translate(None) to mean identity translation
- Prev by Date: Re: Python Challenge ahead [NEW] for riddle lovers
- Next by Date: Re: Python Challenge ahead [NEW] for riddle lovers
- Previous by thread: Micro-PEP: str.translate(None) to mean identity translation
- Next by thread: Re: Micro-PEP: str.translate(None) to mean identity translation
- Index(es):
Relevant Pages
|