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


Groups > comp.lang.python > #108439

Re: String concatenation

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.python
Subject Re: String concatenation
Date 2016-05-09 23:21 +0200
Organization PointedEars Software (PES)
Message-ID <2279805.ZaV9TF1YuJ@PointedEars.de> (permalink)
References <ngogql$bgm$1@dont-email.me> <3414323.Mt0gs2Yp5W@PointedEars.de> <CAPTjJmpoU1NweoWi6jOaHEJySaiY0UytiZDy=KA2avjcod9Saw@mail.gmail.com> <mailman.538.1462760201.32212.python-list@python.org>

Show all headers | View raw


Chris Angelico wrote:

> On Mon, May 9, 2016 at 10:44 AM, Thomas 'PointedEars' Lahn
> <PointedEars@web.de> wrote:
>> With the “%” 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.

If only you cared to read what I referred to:

,-<https://docs.python.org/3/library/stdtypes.html#old-string-formatting>
| 
| 4.7.2. printf-style String Formatting
| 
| Note: The formatting operations described here exhibit a variety of quirks 
| that lead to a number of common errors (such as failing to display tuples 
| and dictionaries correctly). Using the newer str.format() interface helps 
| avoid these errors, and also provides a generally more powerful, flexible 
| and extensible approach to formatting text.
 
Note the key words: “old”, “quirks”, “errors”.

>> Finally, with SQL you should prefer Prepared Statements and Stored
>> Procedures, not bare strings, to avoid SQL injection:
>>
>> <https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet>
> 
> He is safe. He's using parameterized queries.

How do you know?
 
>> Also, it would be a good idea if you posted under your real name. 
>> Internet is the thing with cables; Usenet is the thing with people.
>> I for one tend 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.

I don’t care.  This basic courtesy extended to strangers whose help you seek 
originates in real life, not Usenet.

-- 
PointedEars

Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


Thread

Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-08 19:10 -0400
  Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Tim Chase <python.list@tim.thechases.com> - 2016-05-08 18:37 -0500
  Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Joel Goldstick <joel.goldstick@gmail.com> - 2016-05-08 20:02 -0400
  String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-09 02:44 +0200
    Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) Chris Angelico <rosuav@gmail.com> - 2016-05-09 12:16 +1000
      Re: String concatenation Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-09 23:21 +0200
        Re: String concatenation Steven D'Aprano <steve@pearwood.info> - 2016-05-10 12:32 +1000
          Re: String concatenation Chris Angelico <rosuav@gmail.com> - 2016-05-10 12:42 +1000
            Re: String concatenation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-12 17:43 +1000
        Re: String concatenation Rustom Mody <rustompmody@gmail.com> - 2016-05-09 20:45 -0700
          Re: String concatenation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-10 16:46 +1000
            Re: String concatenation Paul Rubin <no.email@nospam.invalid> - 2016-05-10 00:13 -0700
              Re: String concatenation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-10 17:54 +1000
                Re: String concatenation David Palao <dpalao.python@gmail.com> - 2016-05-10 10:15 +0200
                Re: String concatenation Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-12 17:27 +1000
    Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) srinivas devaki <mr.eightnoteight@gmail.com> - 2016-05-09 09:01 +0530
    Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) srinivas devaki <mr.eightnoteight@gmail.com> - 2016-05-09 09:13 +0530
    Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) Michael Selik <michael.selik@gmail.com> - 2016-05-09 18:29 +0000
    Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 19:53 -0400
      Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-11 02:16 +0200
        Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 20:33 -0400
        Moderation [was Re: ...What's wrong with this concatenation statement?] Steven D'Aprano <steve@pearwood.info> - 2016-05-11 11:17 +1000
        Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Chris Angelico <rosuav@gmail.com> - 2016-05-11 11:43 +1000
          Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-11 21:12 +0200
        Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Ned Batchelder <ned@nedbatchelder.com> - 2016-05-11 12:39 -0700
          Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Chris Angelico <rosuav@gmail.com> - 2016-05-12 09:07 +1000
          Re: % formatting vs .format() (was: What's wrong with this concatenation statement?) Tim Chase <python.list@tim.thechases.com> - 2016-05-11 18:31 -0500
    Re: String concatenation (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) sohcahtoa82@gmail.com - 2016-05-10 17:38 -0700
      Re: String concatenation Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-05-11 21:14 +0200
        Re: String concatenation sohcahtoa82@gmail.com - 2016-05-11 14:30 -0700
          Re: String concatenation Ned Batchelder <ned@nedbatchelder.com> - 2016-05-11 14:50 -0700
          Re: String concatenation DFS <nospam@dfs.com> - 2016-05-11 18:25 -0400
  Re: What's wrong with this concatenation statement? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2016-05-09 17:53 +1000
    Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 12:16 -0400
      Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Rustom Mody <rustompmody@gmail.com> - 2016-05-10 09:41 -0700
      Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Stephen Hansen <me+python@ixokai.io> - 2016-05-10 09:42 -0700
        Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 18:37 -0400
      Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Steven D'Aprano <steve@pearwood.info> - 2016-05-11 02:44 +1000
      Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Ian Kelly <ian.g.kelly@gmail.com> - 2016-05-10 12:15 -0600
        Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 17:21 -0400
          Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Chris Angelico <rosuav@gmail.com> - 2016-05-11 07:27 +1000
            Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 19:40 -0400
              Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Paul Rubin <no.email@nospam.invalid> - 2016-05-10 19:14 -0700
              Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? alister <alister.ware@ntlworld.com> - 2016-05-12 09:12 +0000
                Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Chris Angelico <rosuav@gmail.com> - 2016-05-12 19:23 +1000
                Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-12 08:24 -0400
                Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Michael Torrie <torriem@gmail.com> - 2016-05-12 08:39 -0600
                Why online forums have bad behaviour (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) Ben Finney <ben+python@benfinney.id.au> - 2016-05-13 05:36 +1000
                Re: Why online forums have bad behaviour (was: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement?) Jason Friedman <jsf80238@gmail.com> - 2016-05-12 21:05 -0600
          Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Ethan Furman <ethan@stoneleaf.us> - 2016-05-10 15:12 -0700
            Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 19:29 -0400
              Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Jon Ribbens <jon+usenet@unequivocal.co.uk> - 2016-05-12 13:39 +0000
                Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Chris Angelico <rosuav@gmail.com> - 2016-05-12 23:50 +1000
          Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Ethan Furman <ethan@stoneleaf.us> - 2016-05-10 16:16 -0700
            Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? DFS <nospam@dfs.com> - 2016-05-10 19:41 -0400
  Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? srinivas devaki <mr.eightnoteight@gmail.com> - 2016-05-12 13:53 +0530
    Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Ned Batchelder <ned@nedbatchelder.com> - 2016-05-12 02:36 -0700
      Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Steven D'Aprano <steve@pearwood.info> - 2016-05-13 01:06 +1000
  Re: Steve D'Aprano, you're the "master". What's wrong with this concatenation statement? Chris Angelico <rosuav@gmail.com> - 2016-05-12 18:40 +1000

csiph-web