Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #27641
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <puntabluda@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'example:': 0.03; 'escape': 0.07; 'subject:help': 0.07; 'subject:script': 0.09; 'to:addr:comp.lang.python': 0.09; 'bug': 0.10; 'cc:addr:python- list': 0.10; 'skip': 0.17; 'input': 0.18; 'changes': 0.20; 'this:': 0.23; 'cc:no real name:2**0': 0.24; 'cc:2**1': 0.24; 'script': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'cc:addr:gmail.com': 0.27; 'character': 0.29; 'words': 0.29; 'file': 0.32; 'word.': 0.33; 'received:google.com': 0.34; 'received:209.85': 0.35; 'subject:" ': 0.36; 'possible': 0.37; 'received:209': 0.37; 'received:209.85.216': 0.37; 'subject:: ': 0.38; 'first': 0.61; '#2:': 0.84; 'received:209.85.216.184': 0.84 |
| Newsgroups | comp.lang.python |
| Date | Wed, 22 Aug 2012 07:46:04 -0700 (PDT) |
| In-Reply-To | <mailman.3647.1345640467.4697.python-list@python.org> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=94.253.172.25; posting-account=-GNqbgkAAACkaQd-4rayh8uu8i_oKyvp |
| References | <CAE7MaQbrdVbbFWDJ8GHuoybT2SNPfZyyMFU_beBc_zMKpBHPFg@mail.gmail.com> <CAEtwbM0PwcSb6v5MZ=Dr3s9TVFoXzCOywd=JfWFfBUcM-RFLcQ@mail.gmail.com> <CAPTjJmr7JqsDx6ypjVODTvy315fFYZacNgns60QXmM+zJ5p+Xw@mail.gmail.com> <CAEtwbM2MZ9D_dwv0EYXF8h5G=ucOjVm33Y3Z+E=aMY1fr17Nxw@mail.gmail.com> <mailman.3647.1345640467.4697.python-list@python.org> |
| User-Agent | G2/1.0 |
| X-Google-Web-Client | true |
| X-Google-IP | 94.253.172.25 |
| MIME-Version | 1.0 |
| Subject | Re: help me debug my "word capitalizer" script |
| From | Rebelo <puntabluda@gmail.com> |
| To | comp.lang.python@googlegroups.com |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Cc | python-list@python.org, Kamil Kuduk <kamil.kuduk@gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Message-ID | <mailman.3653.1345646767.4697.python-list@python.org> (permalink) |
| Lines | 31 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1345646767 news.xs4all.nl 6895 [2001:888:2000:d::a6]:50268 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:27641 |
Show key headers only | View raw
> Let's move to Bug #2:
>
> 2. How do I escape the words that are already in uppercase? For example:
>
>
>
> The input file has this:
>
> NASA
>
>
>
> The script changes this to:
>
> Nasa
>
>
>
> Is it possible to make this script look at a word, see if its first
>
> character is capitalized, if capitalized then skip that word. If not
>
> do the processing? I don't wan to use regex? Do I need it?
change:
words[i] = word.capitalize()
into:
if word != word.upper() :
words[i] = word.capitalize()
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: help me debug my "word capitalizer" script Santosh Kumar <sntshkmr60@gmail.com> - 2012-08-22 18:30 +0530
Re: help me debug my "word capitalizer" script Rebelo <puntabluda@gmail.com> - 2012-08-22 07:46 -0700
Re: help me debug my "word capitalizer" script Terry Reedy <tjreedy@udel.edu> - 2012-08-22 13:40 -0400
Re: help me debug my "word capitalizer" script Rebelo <puntabluda@gmail.com> - 2012-08-22 07:46 -0700
csiph-web