[Python-ideas] Descouraging the implicit string concatenation

M.-A. Lemburg mal at egenix.com
Wed Mar 14 12:59:39 EDT 2018


Hi Facundo,

On 14.03.2018 17:47, Facundo Batista wrote:
> 2018-03-14 11:30 GMT-03:00 Stephan Houben <stephanh42 at gmail.com>:
> 
>> Op 14 mrt. 2018 15:23 schreef "Facundo Batista" <facundobatista at gmail.com>:
>>
>> I propose the discouragement of the idiom.
>>
>>
>>
>> What does that mean?
> 
> That we say "hey, this works but please don't use it, because it tends
> to a error prone way of writing some code, instead do this".

I believe this falls under coding style and is not something
we should actively discourage. It's an idiom that many programming
languages share with Python.

You may also want to look at this PEP for a longer discussion
on the topic:

https://www.python.org/dev/peps/pep-3126/

Even pylint rejected a request to have a rule added for this:

https://github.com/PyCQA/pylint/issues/1589


FWIW: I use implicit concats a lot and find them very useful for
e.g. writing long SQL queries or longer string literals at indented
levels where the triple quote approach doesn't work well.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, Mar 14 2018)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> Python Database Interfaces ...           http://products.egenix.com/
>>> Plone/Zope Database Interfaces ...           http://zope.egenix.com/
________________________________________________________________________

::: We implement business ideas - efficiently in both time and costs :::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
                      http://www.malemburg.com/



More information about the Python-ideas mailing list