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


Groups > comp.lang.python > #92406

Re: Python NBSP DWIM

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <random832@fastmail.us>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'scripts': 0.09; 'boundaries.': 0.09; 'creighton': 0.09; 'messing': 0.09; 'received:internal': 0.09; 'textwrap': 0.09; 'wed,': 0.15; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'wrote:': 0.16; 'laura': 0.18; "aren't": 0.22; 'text,': 0.22; 'header:In-Reply-To:1': 0.24; 'words': 0.24; 'rules': 0.27; 'parameters': 0.27; 'separate': 0.27; 'spaces': 0.29; 'url:wikipedia': 0.29; 'whitespace': 0.29; 'url:wiki': 0.30; 'generally': 0.32; 'topic': 0.32; 'another': 0.34; 'languages': 0.34; 'to:addr:python-list': 0.35; 'attempt': 0.35; 'unicode': 0.35; 'but': 0.36; 'being': 0.36; 'text': 0.36; 'url:org': 0.36; 'there': 0.36; 'possible': 0.36; 'received:10': 0.37; 'subject:: ': 0.37; 'rather': 0.38; 'received:66': 0.38; 'url:en': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'where': 0.40; 'called': 0.40; 'from:no real name:2**0': 0.61; 'entire': 0.61; 'header:Message-Id:1': 0.62; 'worth': 0.73; 'break.': 0.84; 'preventing': 0.91
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=cWqvxpAXURp/wtk5XkwLd0/441Y=; b=fwf4Pc Yb3CfvxMumFKu3N70rdFO2K5g5LqQUkK8u1zMHYZtQzwFUP2mMuB1mPTbmFU1+Kl aIyZfPq9y7gPTVari/YKA0e11Na0EL7lnSjPZY/Pd7/R3xAA0UshZLf93vqVpkPB 6hLvyoa6rVWbb0TOQ7RIzzG9EHO31oiQ/rF1U=
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=cWqvxpAXURp/wtk 5XkwLd0/441Y=; b=Ue4OWLR5+dpegivGZ00kA1ivaV3LghQG5WaZ4qRSUAYamJD 0XKl2RAHCdSxRn534OQYIGR1pfl8nhUK0IJHp9mvSDPPsoBPUnQI3qB9XVprHwKr +Nvfpv+MSV4BK7WO2PCHMcjSMeeGxLbaHezvm/6oYTqHS6P/R7M5fdwN6fS0=
X-Sasl-Enc ybBzkschQSZi9LUyU7qrjKFGmL7+HmaWeHY7ERsORTSX 1433951857
From random832@fastmail.us
To python-list@python.org
MIME-Version 1.0
Content-Transfer-Encoding 7bit
Content-Type text/plain
X-Mailer MessagingEngine.com Webmail Interface - ajax-ff004c4b
Subject Re: Python NBSP DWIM
Date Wed, 10 Jun 2015 11:57:37 -0400
In-Reply-To <201506101503.t5AF3w8J004902@fido.openend.se>
References <20150610082812.2ce887c3@bigbox.christie.dr><CANc-5UxaGMbY4BCDjuui4XXq=g2NKYXnYJAzgp9aNzDjOWZjyg@mail.gmail.com> <201506101503.t5AF3w8J004902@fido.openend.se>
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.348.1433951861.13271.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433951861 news.xs4all.nl 2856 [2001:888:2000:d::a6]:55385
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92406

Show key headers only | View raw


On Wed, Jun 10, 2015, at 11:03, Laura Creighton wrote:
> In these unicode days, this thinking may need to be revisited.  There
> are many languages where whitespace does not separate words -- either
> words aren't separated, or in Vietnamese, spaces separate syllables,
> so entire words have spaces in them.

Text wrapping for CJK scripts is another topic that might be worth
addressing in textwrap - words aren't space-separated, but there are
still rules about where you can place a line break. Generally these are
centered around preventing punctuation marks from being orphaned rather
than any attempt to algorithmically find word boundaries.

For the process called "Oikomi", while messing with kerning is not
strictly possible for monospaced text, it might be worthwhile in general
to have "preferred" and "maximum" line widths as parameters for
textwrap.

http://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages

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


Thread

Re: Python NBSP DWIM random832@fastmail.us - 2015-06-10 11:57 -0400

csiph-web