Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '2.7': 0.04; 'python': 0.08; '>>>>': 0.09; 'foo': 0.09; 'pm,': 0.10; 'syntax': 0.11; '>>>': 0.12; 'wrote:': 0.14; 'subject:syntax': 0.16; 'happening': 0.19; 'received:74.125.82.44': 0.19; 'received:mail- ww0-f44.google.com': 0.19; 'header:In-Reply-To:1': 0.21; 'documented': 0.23; 'message-id:@mail.gmail.com': 0.28; 'sun,': 0.30; 'print': 0.31; 'to:addr:python-list': 0.33; 'curious': 0.35; 'subject: ?': 0.35; 'subject:What': 0.35; 'received:google.com': 0.37; 'url:docs': 0.37; 'url:python': 0.38; 'received:74.125.82': 0.38; 'received:74.125': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'here': 0.66; 'subject:this': 0.76; '"foo"': 0.84; 'candide': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=pm2uYijeDD3HB9RcqTwrVeVPZwxv7ZDJMpXGM0k+AgY=; b=E5kknG5WqezN3hO+QshhHpiEBYZ7A6ZJNElwmiRlrNhfxbdJC1KO3yCHpnFVFskjtG D6FIneGDSqlawaAAGbNJ7VeLmui29AgetQMVqB1XMgw42XZ9rutojJ8gnOqiydS7KfIR Gv64YcZDsbIC/1fGrVySdt6A1tqrB20b2pdj0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=jBESfSvLRxv03TvoSMQHHTxD6oXmdj0OxKap2STo9R72OeQnE6pIwX1PYltPjHMmXX oVA8oLkXlOXB/vDUV82IIpUATPnc9eFohnyILBjFZ5iUzmikdGW6WI+diJGeto/MPwk+ bpX4LnueUV/v/HoJJosCchZnCFCOOIMmZtPv4= MIME-Version: 1.0 In-Reply-To: <4dfdfc99$0$715$426a34cc@news.free.fr> References: <4dfdfc99$0$715$426a34cc@news.free.fr> From: Noah Hall Date: Sun, 19 Jun 2011 14:58:41 +0100 Subject: Re: What is this syntax ? To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1308491943 news.xs4all.nl 49039 [::ffff:82.94.164.166]:33744 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7958 On Sun, Jun 19, 2011 at 2:41 PM, candide wrote: > With Python 2.7 : > >>>> x="foo" >>>> print '"'+x+'"' > "foo" > What is this curious syntax on line 2 ? Where is it documented ? Just to make it clear to you what is happening - >>> x = "foo" >>> print ' " ' + x + ' " ' " foo " >>> Anyway, it's documented here - http://docs.python.org/tutorial/introduction.html#strings