[Python-ideas] Implicit String Concatenation

Adam Atlas adam at atlas.st
Wed Apr 11 20:39:00 CEST 2007

On 11 Apr 2007, at 11.01, Collin Winter wrote:

> On 4/11/07, Georg Brandl <g.brandl at gmx.net> wrote:
>> No, please! The concatenation of string literals is done in the  
>> parser.
>> Your proposal would move that to runtime and introduce a  
>> "whitespace operator".
>> How would you spell that? How would you overload it? etc.
> A single-width whitespace operator would just be confusing since PEP
> 3117 will be using zero-width spaces for the None typedef : )

I propose we use the ASCII character 0x07 (BEL) as the concatenation  
operator. It's invisible, so your code still looks nice and clean,  
but you know it's there because your text editor will beep at you  
every time you pass it. :)

(Speaking of PEP 3117, I will fight it to the death unless the  
typedef for Exception is changed to Unicode character 2620 (SKULL AND  
CROSSBONES) or 2623 (BIOHAZARD SIGN). Brilliant choice for frozenset,  
though. No longer need I wonder why the Unicode Consortium saw fit to  
include a snowman character!)

More information about the Python-ideas mailing list