Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45931

Re: Prepending string "@" to usernames

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <thomasmurphymusic@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.029
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'subject:string': 0.09; 'cc:addr:python-list': 0.11; '-tkc': 0.16; 'ah!': 0.16; 'chunks.': 0.16; 'to:addr:python.list': 0.16; 'to:addr:tim.thechases.com': 0.16; 'to:name:tim chase': 0.16; 'code.': 0.18; 'trying': 0.19; 'written': 0.21; 'cc:addr:gmail.com': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'towards': 0.31; 'something': 0.35; 'received:google.com': 0.35; 'transition': 0.36; 'thanks': 0.36; 'list': 0.37; 'step': 0.37; 'little': 0.38; 'address': 0.63; 'more': 0.64; 'thomas': 0.65; 'charset:windows-1252': 0.65; 'visually': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=c3rMIe2lcv03nuhiFZSAmjpeuTA059TA72QbCRoGQVM=; b=FQcK1JNWaSf0hvsGMPD1s2bpXOeGxGNwRK1ptRb4Un5/CIeNNlEQDERV+dSkAlPDae I1a16IgFk9wv1/V41toXlFNVDp3tSRi2gapTMEukm3GiLnC4hbSnJOEPNW0m/qnHC3Im nrvGJocov7zC/QDm9l+FOJeNx9EP5J/EpVo2mdTMOKcy3H10E1O1NNeIDijUpeNBr2Wh Zib7RJ0BwEh6BAIa712HSiiA4YNDvCd3KDjwhy1MMFc+ikBVcYll6CUB8o3bjB7rL6e+ w3SMo6G8yJzrECRTmCOp+Rj/W/K5C/D4Mfrno60XE/8N3xHJghnw/ftJwJjpnGAQ2EKW lhXg==
MIME-Version 1.0
X-Received by 10.50.36.10 with SMTP id m10mr724577igj.31.1369440143676; Fri, 24 May 2013 17:02:23 -0700 (PDT)
In-Reply-To <20130524181940.620d18ad@bigbox.christie.dr>
References <CAEcwjcx6WtUMTg=QpqjEZ3fyfUhOLWQ2v-pF4qQ9ypFd3DtByA@mail.gmail.com> <CAGGBd_okY709NyG0BBZSHzv709oTAUNbicMgfOMjo3LjFDipwQ@mail.gmail.com> <CAEcwjcyFYMg6sxND7XE6cKOkab3HB2nA89CBJLp2Cq9g5F3h-A@mail.gmail.com> <20130524181940.620d18ad@bigbox.christie.dr>
Date Fri, 24 May 2013 20:02:23 -0400
Subject Re: Prepending string "@" to usernames
From Thomas Murphy <thomasmurphymusic@gmail.com>
To Tim Chase <python.list@tim.thechases.com>
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding quoted-printable
Cc Python <python-list@python.org>
X-BeenThere python-list@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-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>
Newsgroups comp.lang.python
Message-ID <mailman.2090.1369440146.3114.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369440146 news.xs4all.nl 15963 [2001:888:2000:d::a6]:43212
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:45931

Show key headers only | View raw


> Which can be tidily written as a list comprehension:
>
>   final_address = ['@' + address for address in raw_address.split()]
>
> -tkc
>
>
Ah! Thanks Tim…that tidiness is something I'm trying to head towards
in my own code. I'm trying to transition from the need to visually
write every little step out and write in these more powerful chunks.


--
Sincerely,
Thomas Murphy
Code Ninja
646.957.6115

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Prepending string "@" to usernames Thomas Murphy <thomasmurphymusic@gmail.com> - 2013-05-24 20:02 -0400

csiph-web