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



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

.



Relevant Pages

  • Micro-PEP: str.translate(None) to mean identity translation
    ... signifying no translation, but allowing easy expression of deleting characters, ...
    (comp.lang.python)
  • Re: pop up a TCHAR[1024]
    ... best regards, ... DWORD dwDataSize = 0; ... // other than the one we added at the end above, the string will not ... // after the translation. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Very, very slow macro
    ... > introducing translation problems by splitting sentences, ... set the Find format to Bold (and leave the box ... >> Best Regards, JS ...
    (microsoft.public.word.vba.general)
  • Re: us big oil....the people start to vote against suvs....
    ... that sounds like a damned good translation of 'blue is this year's black'. ... regards... ... energy, education, politics, etc 1,531,404 document calls in year past ...
    (uk.politics.misc)
  • Re: strtran() how to
    ... >> This code is part of a translation of dutch text to english. ... >> so I can't check which noccurence to translate. ...
    (microsoft.public.fox.programmer.exchange)