Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38825
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.datemas.de!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Walter Hurry <walterhurry@lavabit.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: string.replace doesn't removes ":" |
| Date | Wed, 13 Feb 2013 18:16:34 +0000 (UTC) |
| Organization | albasani.net |
| Lines | 65 |
| Message-ID | <kfgla1$cci$1@news.albasani.net> (permalink) |
| References | <mailman.1536.1360407866.2939.python-list@python.org> <92122dd3-ac2e-4407-87ed-0b250ed9c8b9@googlegroups.com> <mailman.1738.1360733201.2939.python-list@python.org> <25d2297a-6fee-4ef5-bcbd-e26a28cf6ce4@e10g2000vbv.googlegroups.com> <fbca1681-2814-4331-91c1-cce852ce530d@googlegroups.com> <mailman.1746.1360774412.2939.python-list@python.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.albasani.net J97S5ByeweL98cn8pF6O3j9td8UC4BsRS1YYARt9NMRORqQ8wGvm60r4RZumRhSlG/HwpFoY83fZn9Z8fEeq6XLrHSmNijZoHFvtUGwvS6hvd5P8HX8QA11cJMVgBbVP |
| NNTP-Posting-Date | Wed, 13 Feb 2013 18:16:34 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="WjybMOYzk15jA6ZJ8q2gcA+TN8SzLLKCwFjFDGCbCSJOmZQdrRJcG30RIZeR4ep3QsyYIPzt5ucUwCAAyAWNuhv5eYgkyfmReE7Lj/NsosBKhO0QhD3wyIHkLd0LeBke"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) |
| Cancel-Lock | sha1:Brt4MEO9Byy8FOgAS0L4uiETdH8= |
| Xref | csiph.com comp.lang.python:38825 |
Show key headers only | View raw
On Wed, 13 Feb 2013 16:55:36 +0000, Mark Lawrence wrote:
> On 13/02/2013 16:34, Rick Johnson wrote:
>> On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
>>>
>>>>>> d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'}
>>>>>> 'abcdefgabc'.translate(d)
>>> 'A2CdefgA2C'
>>>>>>
>>>>>>
>>>>>> def jmTranslate(s, table):
>>> ... table = {ord(k):table[k] for k in table}
>>> ... return s.translate(table)
>>> ...
>>>>>> d = {'a': 'A', 'b': '2', 'c': 'C'}
>>>>>> jmTranslate('abcdefgabc', d)
>>> 'A2CdefgA2C'
>>>>>> d = {'a': None, 'b': None, 'c': None}
>>>>>> jmTranslate('abcdefgabc', d)
>>> 'defg'
>>>>>> d = {'a': '€€€€€', 'b': '€€€€', 'c': '€€€€'}
>>>>>> jmTranslate('abcdefgabc', d)
>>> '€€€€€€€€€€€€€defg€€€€€€€€€€€€€'
>>
>> [quip] I just really prefer a cryptic solution to a problem when a
>> simplistic and consistent approach would suffice.[/quip] TO HELL WITH
>> THE ZEN!
>>
>> "Beautiful is better than ugly."
>> BROKEN!
>>
>> "Explicit is better than implicit."
>> BROKEN!
>>
>> "Simple is better than complex."
>> BROKEN!
>>
>> "Sparse is better than dense."
>> BROKEN!
>>
>> "Readability counts."
>> BROKEN BROKEN BROKEN!!!!
>>
>> "Special cases aren't special enough to break the rules."
>> BROKEN!
>>
>> "In the face of ambiguity, refuse the temptation to guess."
>> BROKEN!
>>
>> "There should be one-- and preferably only one --obvious way to do it."
>> BROKEN BROKEN BROKEN!
>>
>> "If the implementation is hard to explain, it's a bad idea."
>> BROKEN!
>>
>> "If the implementation is easy to explain, it may be a good idea."
>> REINFORCED BY BAD EXAMPLE
>>
>>
> jmf and rr in combination reminded me of this. I hope you all get my
> drift :)
>
> http://www.cc.gatech.edu/fac/Spencer.Rugaber/poems/love.txt
10-4, good buddy.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
string.replace doesn't removes ":" Joshua Robinson <shooki.robinson@gmail.com> - 2013-02-09 06:04 -0500
Re: string.replace doesn't removes ":" Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-02-10 11:36 +0100
Re: string.replace doesn't removes ":" vduncan80@gmail.com - 2013-02-12 07:14 -0800
Re: string.replace doesn't removes ":" Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-12 20:44 -0800
Re: string.replace doesn't removes ":" Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-12 21:26 -0800
Re: string.replace doesn't removes ":" Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-12 21:26 -0800
Re: string.replace doesn't removes ":" jmfauth <wxjmfauth@gmail.com> - 2013-02-12 23:10 -0800
Re: string.replace doesn't removes ":" Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-13 08:34 -0800
Re: string.replace doesn't removes ":" Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-13 16:55 +0000
Re: string.replace doesn't removes ":" Walter Hurry <walterhurry@lavabit.com> - 2013-02-13 18:16 +0000
Re: string.replace doesn't removes ":" 88888 Dihedral <dihedral88888@googlemail.com> - 2013-02-13 12:24 -0800
Re: string.replace doesn't removes ":" jmfauth <wxjmfauth@gmail.com> - 2013-02-14 00:02 -0800
Re: string.replace doesn't removes ":" Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-12 20:44 -0800
csiph-web