Message from discussion
change the first letter into uppercase (ask)
Received: by 10.181.12.101 with SMTP id ep5mr1344730wid.1.1351391098563;
Sat, 27 Oct 2012 19:24:58 -0700 (PDT)
Path: q13ni70614wii.0!nntp.google.com!feeder3.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news.panservice.it!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path: <ian.g.ke...@gmail.com>
X-Original-To: python-l...@python.org
Delivered-To: python-l...@mail.python.org
X-Spam-Status: OK 0.125
X-Spam-Level: *
X-Spam-Evidence: '*H*': 0.76; '*S*': 0.01; 'subject:into': 0.09;
'sat,': 0.15; 'oct': 0.16; 'string': 0.17; 'wrote:': 0.17; '>>>':
0.18; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com':
0.27; 'subject:change': 0.33; 'to:addr:python-list': 0.33;
'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35;
'test': 0.36; 'subject: (': 0.36; 'received:209': 0.37; 'subject::
': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40;
'20,': 0.65; 'subject:letter': 0.84; 'to:name:python': 0.84;
'dennis': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type; bh=PkBTwdXti4CZg08ovCWaEl31sWoWUDApHptH4zVB4YM=;
b=hhd3SyWWc2Me4UgyTsH8ge3EpQsJ860rl5kKJt//+zysnzrPk8mn34NyzRsbG9AI/V
OQmmaIc+WR/tpWlOApkqDw3hqHfcFpEsTyLH0euvlHFnjc+L53loYRMRjcNn3h1eDIuG
sIeYVrAcgJ/zGiSY2ILxfoZVXcFFdNwxiV81opIJfxge0sDmo4Zg1Hz/br5c478dQo4q
PP0Zq2txQ5tPtT1b6hZ5hF0EzaJYwnaST8fG8oCwusUmGtAxJbVkx7PbfnH1/BqK4ACc
FMunELTr9+G3wZfvelEki+238BSYBNgYa/XZW3okYokCSdT2dr3325571Fe9m6TMTOYi
IKlQ==
MIME-Version: 1.0
In-Reply-To: <fju588hc3kt5peqt48gcft1eqo8456nkjt@invalid.netcom.com>
References: <CA+YdQ_5DAp88HJiQnW9ejDuQGomW5X_b1dUP_sygJB+7s_9iyg@mail.gmail.com>
<CANaSqUfHejaD-esy8o573KfZ1UJsNTbw4ziq0DN4ehEjU0A...@mail.gmail.com>
<fju588hc3kt5peqt48gcft1eqo8456n...@invalid.netcom.com>
From: Ian Kelly <ian.g.ke...@gmail.com>
Date: Sat, 20 Oct 2012 17:44:04 -0600
Subject: Re: change the first letter into uppercase (ask)
To: Python <python-l...@python.org>
X-BeenThere: python-l...@python.org
X-Mailman-Version: 2.1.15
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-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-l...@python.org>
List-Help: <mailto:python-list-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-requ...@python.org?subject=subscribe>
Newsgroups: comp.lang.python
Message-ID: <mailman.2574.1350776677.27098.python-l...@python.org>
Lines: 12
NNTP-Posting-Host: 2001:888:2000:d::a6
X-Trace: 1350776677 news.xs4all.nl 6935 [2001:888:2000:d::a6]:48132
X-Complaints-To: ab...@xs4all.nl
Content-Type: text/plain; charset=ISO-8859-1
On Sat, Oct 20, 2012 at 1:30 PM, Dennis Lee Bieber
<wlfr...@ix.netcom.com> wrote:
>> >>> for match in re.findall(pattern, "a test of capitalizing"):
>> ... result = f(result + match)
>
> result = result + f(match)
>
> Or closer... Don't both with f and str.capitalize
>
> result = result + match.capitalize()
These result in a string that is all-caps, not title-case.