Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92397

Python NBSP DWIM

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.043
X-Spam-Evidence '*H*': 0.92; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.11; ':-)': 0.14; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; '>>>': 0.20; 'bug?': 0.22; 'linux': 0.26; "doesn't": 0.28; 'to:addr:python-list': 0.35; 'received:10': 0.37; 'charset:us-ascii': 0.37; 'skip:p 20': 0.38; 'space': 0.38; 'to:addr:python.org': 0.39; 'seem': 0.39; 'more': 0.62; 'respect': 0.65; 'received:50': 0.66; '2014,': 0.91
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-Sender-Id wwwh|x-authuser|tim@thechases.com
X-MC-Relay Neutral
X-MailChannels-SenderId wwwh|x-authuser|tim@thechases.com
X-MailChannels-Auth-Id wwwh
X-MC-Loop-Signature 1433942875989:1614804942
X-MC-Ingress-Time 1433942875988
Date Wed, 10 Jun 2015 08:28:12 -0500
From Tim Chase <python.list@tim.thechases.com>
To python-list@python.org
Subject Python NBSP DWIM
X-Mailer Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-AuthUser tim@thechases.com
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.339.1433943366.13271.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433943366 news.xs4all.nl 2939 [2001:888:2000:d::a6]:44045
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 2780
X-Received-Body-CRC 1522240634
Xref csiph.com comp.lang.python:92397

Show key headers only | View raw


str.split() doesn't seem to respect non-breaking space:

  Python 3.4.2 (default, Oct  8 2014, 10:45:20) 
  [GCC 4.9.1] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> print(repr("hello\N{NO-BREAK SPACE}world".split()))
  ['hello', 'world']

What's the purpose of a non-breaking space if it's treated like a
space for breaking/splitting purposes? :-)

Is this a bug?

-tkc



Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Python NBSP DWIM Tim Chase <python.list@tim.thechases.com> - 2015-06-10 08:28 -0500

csiph-web