Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'string': 0.09; 'escape': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'way:': 0.09; '\xe2\x80\x94': 0.09; 'python': 0.11; 'itself.': 0.14; '*string': 0.16; 'backslash': 0.16; 'finney': 0.16; 'itself,': 0.16; 'literals': 0.16; 'literals*': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'unchanged': 0.16; 'code.': 0.18; 'else,': 0.19; 'code,': 0.22; 'cloud': 0.22; 'putting': 0.22; 'rules': 0.22; 'header:User-Agent:1': 0.23; 'apply.': 0.24; 'text.': 0.24; 'source': 0.25; 'somewhere': 0.26; 'header:X -Complaints-To:1': 0.27; 'chris': 0.29; 'characters': 0.30; 'code': 0.31; 'writes:': 0.31; 'another': 0.32; 'text': 0.33; 'created': 0.35; 'computing': 0.35; 'but': 0.35; 'sequence': 0.36; 'ben': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'according': 0.40; 'read': 0.60; 'our': 0.64; '\xe2\x80\x93': 0.77; 'sole': 0.78; 'bypasses': 0.84; 'different.': 0.84; 'received:125': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: rst and pypandoc Date: Tue, 03 Mar 2015 10:18:05 +1100 References: <54f458a5$0$13003$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:sr106H45eZpM8Ug34dH7fssRafI= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1425338274 news.xs4all.nl 2890 [2001:888:2000:d::a6]:46961 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86792 Chris Angelico writes: > And of course, that means you have to escape the backslash if you want > to have one in the text. But all of this is just for putting *string > literals* into your source code. If it's not Python source code, these > rules don't apply. You can read a line of text from the user and it'll > be unchanged To put it another way: The source code is not the value itself. The string value is created *from* the characters in the source code, and the sequence of characters in the string value may be different. When the string value comes from somewhere else, it bypasses this interpretation of source code — because it's not source code! String literals exist in your Python source code. They are not the same thing as the string value itself, and the sequence fo characters may be different. -- \ “Try adding “as long as you don't breach the terms of service – | `\ according to our sole judgement” to the end of any cloud | _o__) computing pitch.” —Simon Phipps, 2010-12-11 | Ben Finney