Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38356
| From | Serhiy Storchaka <storchaka@gmail.com> |
|---|---|
| Subject | Re: Curious to see alternate approach on a search/replace via regex |
| Date | 2013-02-07 18:56 +0200 |
| References | <20130206134105.9352d665e1f8d0719021fcf9@lavabit.com> <kevta5$ii3$1@ger.gmane.org> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1453.1360256193.2939.python-list@python.org> (permalink) |
On 07.02.13 11:49, Peter Otten wrote: > ILLEGAL = "-:./?&=" > try: > TRANS = string.maketrans(ILLEGAL, "_" * len(ILLEGAL)) > except AttributeError: > # python 3 > TRANS = dict.fromkeys(map(ord, ILLEGAL), "_") str.maketrans()
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Curious to see alternate approach on a search/replace via regex Serhiy Storchaka <storchaka@gmail.com> - 2013-02-07 18:56 +0200
csiph-web