[Python-ideas] Implicit string literal concatenation considered harmful?

Stefan Drees stefan at drees.name
Sat May 11 13:43:53 CEST 2013


Am 11.05.13 02:43, schrieb Greg Ewing:
> Antoine Pitrou wrote:
>> As for "+", saying it is a replacement is a bit simplified, because
>> the syntax definition (for method calls) or operator precedence (for
>> e.g. %-formatting) may force you to add parentheses.
>
> Maybe we could turn ... into a "string continuation
> operator":
>
>     print("This is example %d of a line that is "...
>           "too long" % example_number)
>

at least trying to follow the complete thread so only a
late feedback on this proposal from me:

The mysterious type [Ellipsis] comes to the rescue with all of its three 
characters - helping to stay below 80 chars ?

In this message I avoid further adding or subtracting numbers to
not overflow the result ;-) but I somhow like the current two possible 
ways of doing "it", as when - manually - migrating code eg. from php to 
python I may either remove dots or replace these with plus signs.

So I have a fast working migrated code base and then - while the clients 
work with it - I have a more relaxed schedule to further clean it up.

[Ellipsis]: http://docs.python.org/3.3/reference/datamodel.html#index-8

All the best,
Stefan.




More information about the Python-ideas mailing list