Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: 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; 'from:addr:yahoo.co.uk': 0.04; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sake': 0.09; 'seemed': 0.09; 'style.': 0.09; 'subject:string': 0.09; 'language.': 0.14; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:python': 0.16; 'language': 0.16; 'wrote:': 0.18; 'obviously': 0.18; 'header:User-Agent:1': 0.23; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'generally': 0.29; 'change,': 0.30; 'compared': 0.30; "skip:' 10": 0.31; 'context,': 0.31; 'could': 0.34; 'but': 0.35; 'there': 0.35; 'list': 0.37; 'performance': 0.37; 'to:addr:python-list': 0.38; 'short': 0.38; 'quote': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'our': 0.64; 'more': 0.64; 'charset:windows-1252': 0.65; 'readers': 0.68; 'complexity': 0.84; 'penalty': 0.84; 'received:2': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: python string, best way to concat Date: Thu, 28 Aug 2014 09:43:07 +0100 References: <55bab2a0-e0bc-4398-90b4-c9937498f5d8@googlegroups.com> <63bdccb4-9e34-4e40-b07d-14342e21815f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-2-98-202-53.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <63bdccb4-9e34-4e40-b07d-14342e21815f@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409215403 news.xs4all.nl 2898 [2001:888:2000:d::a6]:37003 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77189 On 28/08/2014 09:30, peter wrote: > I used to struggle with the concept of ''.join(('hello ','world')) - it seemed so convoluted compared with the intuitive 'hello '+'world', and I could never remember the syntax. Also, for the strings I was generally using the performance penalty was infinitesimal, so I was just adding complexity for the sake of the abstract concept of a more 'pythonic' style. > > Obviously this isn't going to change, but for concatenating short strings a and b is there any practical reason to avoid a+b? > > Peter > Please quote context, there's some smart people on this list but none of them are mind readers :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence