<div dir="ltr">On Wed, Oct 26, 2016 at 5:32 PM, Mikhail V <span dir="ltr"><<a href="mailto:mikhailwas@gmail.com" target="_blank">mikhailwas@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> (b) has the advantage of adding translation and removal in one fell swoop --<br>
> but if you only want to remove, then you have to make a translation table of<br>
> 1:1 mappings = not hard, but a annoying:<br>
<br>
</span>Exactly that is the proposal. And for same exact reason that you point out,<br>
I also can't give a comment what would be better. It would be indeed<br>
quite strange from syntactical POV if I just want to remove "all except"<br>
and must call translate(). So ideally both should exist I think.<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div><br></div><div>That kind of violate OWTDI though. Probably one's enough.<br></div><br></div><div class="gmail_quote">and if fact with the use-cases I can think of, and the one you mentioned, they are really two steps: there are the characters you want to translate, and the ones you want to keep, but the ones you want to keep are a superset of the ones you want to translate. so if we added the "remove"option to .translate(), then you would need to add all the "keep" charactors to your translate table.<br><br></div><div class="gmail_quote">I'm thinking they really are different operations, give them a different method.<br></div><div class="gmail_quote"><br></div><div class="gmail_quote">-CHB<br><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>