What is this syntax ?

candide candide at free.invalid
Sun Jun 19 11:08:01 EDT 2011


OK,  thanks for your explanation, it was just stringisation !


I erroneously focused on

+x+

as a kind of placeholder unknown to me, instead of left and right 
concatenations ;)

It would be more readable for me if it were edited

 >>> print '"' + x + '"' # better spacing
"foo"
 >>>

or with string formatting :

 >>> x="foo"
 >>> print '"%s"' %x
"foo"
 >>>




More information about the Python-list mailing list