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


Groups > comp.lang.python > #80720

Re: A Freudian slip of *EPIC PROPORTIONS*!

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.036
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'parsing': 0.09; 'strings.': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '"a"': 0.16; 'collapse': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'germane': 0.16; 'unicode,': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'comparing': 0.24; 'parse': 0.24; 'replace': 0.24; 'simpler': 0.24; 'unicode': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; "doesn't": 0.30; 'characters': 0.30; 'message- id:@mail.gmail.com': 0.30; 'strip': 0.31; 'fri,': 0.33; 'johnson': 0.35; 'received:google.com': 0.35; '14,': 0.36; 'method': 0.36; 'turn': 0.37; 'nov': 0.38; 'anything': 0.39; 'structure': 0.39; 'letters': 0.60; 'fact,': 0.69; 'respect': 0.70; '10:11': 0.84; 'proves': 0.84; 'subject: *': 0.84; 'to:none': 0.92; 'rick': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=G6pXwV0xos0PMuiYWeSYdD19jffX3egKKUIppgKwQnw=; b=N1P2sztMPn35JIAAXRVSVjGJxlz3DpBNWg3q/ZgrqrZertO7uywx2lI0leOddkU6Yz qh+51BoU7lw1VyZAoDpzNRl9R70sfcnQ6OcBZPbQWDHEjgYBZyhvIFWHaGB/hP3JNHyx nOcR8yUHjADtypwNnc09ArrmPkvX2d4Dz08VFrlQsfYOxuwBRZKlfgUAYQAi4IP3MvSy kbUDuM0hefR70X/6Fcg8XVdHpkjewvNC1OKvEPSeqEjmYNgc8T3u/a0KbVc8S/+pytPM nOH11sVibRr+8/CsiXfGyV0dZkpta/GXWd+/mzFyFgBOpgajxgcxgrKIo2SSAf4tWYz5 +3BQ==
MIME-Version 1.0
X-Received by 10.50.136.134 with SMTP id qa6mr2271597igb.2.1415921731208; Thu, 13 Nov 2014 15:35:31 -0800 (PST)
In-Reply-To <dc7c5b45-d8c2-43f2-b6ee-f6209e186846@googlegroups.com>
References <dc7c5b45-d8c2-43f2-b6ee-f6209e186846@googlegroups.com>
Date Fri, 14 Nov 2014 10:35:31 +1100
Subject Re: A Freudian slip of *EPIC PROPORTIONS*!
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.15795.1415921734.18130.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1415921734 news.xs4all.nl 2943 [2001:888:2000:d::a6]:41670
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4033
X-Received-Body-CRC 1577383305
Xref csiph.com comp.lang.python:80720

Show key headers only | View raw


On Fri, Nov 14, 2014 at 10:11 AM, Rick Johnson
<rantingrickjohnson@gmail.com> wrote:
>     # The parse functions have no idea what to do with
>     # Unicode, so replace all Unicode characters with "x".
>     # This is "safe" so long as the only characters germane
>     # to parsing the structure of Python are 7-bit ASCII.
>     # It's *necessary* because Unicode strings don't have a
>     # .translate() method that supports deletechars.

Sounds to me like the functions that collapse whitespace to single
spaces, or turn all letters into "A" and all digits into "9", or
lowercase/casefold all alphabetics, or strip diacriticals, or anything
else of that nature. It's often simpler to fold equivalencies together
before parsing or comparing strings. It doesn't mean you don't respect
Unicode; in fact, it proves that you *do*.

So if you stop calling Unicode "vile", you might actually learn something.

ChrisA

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


Thread

A Freudian slip of *EPIC PROPORTIONS*! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-11-13 15:11 -0800
  Re: A Freudian slip of *EPIC PROPORTIONS*! Chris Angelico <rosuav@gmail.com> - 2014-11-14 10:35 +1100
  Re: A Freudian slip of *EPIC PROPORTIONS*! Terry Reedy <tjreedy@udel.edu> - 2014-11-13 19:34 -0500
    Re: A Freudian slip of *EPIC PROPORTIONS*! Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-15 23:28 +1100
      Re: A Freudian slip of *EPIC PROPORTIONS*! Terry Reedy <tjreedy@udel.edu> - 2014-11-15 15:12 -0500
  Re: A Freudian slip of *EPIC PROPORTIONS*! KO <KO@example.org> - 2014-11-14 08:25 +0000
    Re: A Freudian slip of *EPIC PROPORTIONS*! wxjmfauth@gmail.com - 2014-11-14 01:57 -0800

csiph-web