Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) Date: Mon, 9 May 2016 12:16:40 +1000 Lines: 25 Message-ID: References: <3414323.Mt0gs2Yp5W@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de 62zelR2V/TpMIhJ8+7lWbAVUUAz5ugMPJAKN+MnSn0+g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.017 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'operator': 0.03; 'subject:skip:c 10': 0.07; 'cc:addr:python-list': 0.09; 'statements': 0.09; 'stored': 0.10; '2016': 0.16; 'deprecated.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:?)': 0.16; 'subject:String': 0.16; 'usenet': 0.16; 'wrote:': 0.16; 'string': 0.17; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'posted': 0.21; 'exceptions': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'message-id:@mail.gmail.com': 0.27; 'finally,': 0.27; 'tend': 0.27; 'idea': 0.28; "skip:' 10": 0.28; 'values': 0.28; 'strings,': 0.29; "i'm": 0.30; 'probably': 0.31; "he's": 0.33; 'received:google.com': 0.35; 'should': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'spread': 0.37; 'received:209': 0.38; 'subject:the': 0.39; 'subject:with': 0.40; 'your': 0.60; 'avoid': 0.61; 'real': 0.62; 'thomas': 0.63; 'url:index': 0.67; 'internet': 0.70; 'chrisa': 0.84; 'received:209.85.215.42': 0.84; 'subject:this': 0.85; 'subject:you': 0.85; 'url:php': 0.86; 'to:none': 0.91; 'safe.': 0.93 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:cc :content-transfer-encoding; bh=6Uun8UtwnNdo35Nv0FN8hy4js6iwo7cvWjtF/xIAlsA=; b=FqcTL4VHCPTOpJ3UM7/gPCnshBEOAHgsUqt/PV8vFsHIkufd9nQ/6xLZO1T/UWAinq Sx2B7+foH7F4G4/XjrEzx7tCtAmt+ajtlJawv4B0l01Ls6NC+Axy4ErSHymOUrCpHycz QyHTVJ9VE9cmAdYM8XFWX5EYBlKoZ93w2PMJJyJaeEDFJ545npcxbR7RgIvKBxZKoKcZ 1SD+kHZjSEuxAtQTKFa7PpSLcL3AMo/mDjX7pBwO07Rz73kPrF1ZIrlXVQqyJmCfaEuE pBPtmrKd+axDMvE5LQ8EHZIw85GVUFwzjyVJaAqNbZ6osamW3aIqyXozEE1Mk9i1FSV0 FFeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc:content-transfer-encoding; bh=6Uun8UtwnNdo35Nv0FN8hy4js6iwo7cvWjtF/xIAlsA=; b=YyU+R3DqnVAPByB8ikcHs5N2puODLTPv5l6qyGR/KIsBZR6H74V/7B1ceLmvEaeM1T /zFo+tRiNJYCbA6EHQJ0cX+MKYE4X6SYJsSU7OBNOd2NsOpAZskWIfpvSPSGK38Y+7pn K0+rmwkYTCPHn1CpYV34FJpPWCukzpXH1m46luRsKAd20AWlvRU+DSpIZZbfSK8yf9sg W4Dg3wkvtKtRdplpaMyML/R3/JNSKyjn//babk24nozsx0fWYNPQOaH3VeJa3LIsaiD0 UpIDjWnmoYQarA/O3L8jMyZxOCdLYMzsPkgp+dmlgO0ckG4fL8woYWfRWocsELsuyV5Q AQ5Q== X-Gm-Message-State: AOPr4FWhFvCCU4Hnn+EO+13w/9vXro6HVtl+4qEBHAswdxyTLUwDZllw36IBBQrBfuo9Jtv3g70lxGKCDZM0DA== X-Received: by 10.25.148.69 with SMTP id w66mr3356793lfd.28.1462760200104; Sun, 08 May 2016 19:16:40 -0700 (PDT) In-Reply-To: <3414323.Mt0gs2Yp5W@PointedEars.de> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <3414323.Mt0gs2Yp5W@PointedEars.de> Xref: csiph.com comp.lang.python:108403 On Mon, May 9, 2016 at 10:44 AM, Thomas 'PointedEars' Lahn wrote: > With the =E2=80=9C%=E2=80=9D string operator (deprecated), str.format(), = and str.Template, > you can use other values in string values even without concatenation. Not deprecated. Don't spread FUD. > Finally, with SQL you should prefer Prepared Statements and Stored > Procedures, not bare strings, to avoid SQL injection: > > He is safe. He's using parameterized queries. > Also, it would be a good idea if you posted under your real name. Intern= et > is the thing with cables; Usenet is the thing with people. I for one ten= d > to avoid communicating with few-letter entities; exceptions to that would > probably include only E.T., M.J., ALF, and K.I.T.T. I'm not using Usenet, Mr PointedEars. ChrisA