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


Groups > comp.lang.python > #80838

Re: A Freudian slip of *EPIC PROPORTIONS*!

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'attribute': 0.07; 'context': 0.07; 'correct.': 0.07; 'failing': 0.07; 'kaiser': 0.07; 'nasty': 0.07; 'revision': 0.07; 'source.': 0.07; 'broke': 0.09; 'feature,': 0.09; 'parsing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'windows,': 0.09; 'python': 0.11; 'jan': 0.12; 'kurt': 0.12; 'itself.': 0.14; 'changes': 0.15; 'color.': 0.16; 'command.': 0.16; 'germane': 0.16; 'grep': 0.16; 'kbk': 0.16; "kurt's": 0.16; 'mine.': 0.16; 'parameter.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'unicode,': 0.16; 'unlikely': 0.16; 'written)': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'looked': 0.18; 'variable': 0.18; '2001': 0.19; 'written': 0.21; 'command': 0.22; '>>>': 0.22; 'hack': 0.22; 'header:User-Agent:1': 0.23; '2.x': 0.24; 'parse': 0.24; 'replace': 0.24; 'unicode': 0.24; 'file.': 0.24; 'question': 0.24; 'source': 0.25; 'shown': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; 'character': 0.29; 'characters': 0.30; 'lines': 0.31; 'assumes': 0.31; "d'aprano": 0.31; 'quotes': 0.31; 'steven': 0.31; 'file': 0.32; 'probably': 0.32; 'everyone': 0.33; 'older': 0.33; 'raw': 0.33; 'comment': 0.34; 'could': 0.34; 'johnson': 0.35; 'doubt': 0.36; "didn't": 0.36; 'method': 0.36; 'two': 0.37; 'list': 0.37; 'list.': 0.37; 'easily': 0.37; 'being': 0.38; 'follows:': 0.38; 'fri': 0.38; 'window': 0.38; 'to:addr :python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'expect': 0.39; 'structure': 0.39; 'to:addr:python.org': 0.39; 'changed': 0.39; 'received:org': 0.40; 'skip:u 10': 0.60; 'above,': 0.60; 'most': 0.60; 'march': 0.61; 'numbers': 0.61; 'back': 0.62; 'name': 0.63; 'refer': 0.63; 'confirm': 0.64; 'different': 0.65; 'linked': 0.65; 'opinions': 0.70; 'respect': 0.70; 'clicking': 0.73; 'jul': 0.74; 'saw': 0.77; '6:11': 0.84; 'explorer': 0.84; 'received:fios.verizon.net': 0.84; 'subject: *': 0.84; 'received:108': 0.93; 'rick': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: A Freudian slip of *EPIC PROPORTIONS*!
Date Sat, 15 Nov 2014 15:12:22 -0500
References <dc7c5b45-d8c2-43f2-b6ee-f6209e186846@googlegroups.com> <mailman.15803.1415925300.18130.python-list@python.org> <54674700$0$13003$c3e8da3$5496439d@news.astraweb.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host pool-108-16-203-145.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
In-Reply-To <54674700$0$13003$c3e8da3$5496439d@news.astraweb.com>
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.15857.1416082366.18130.python-list@python.org> (permalink)
Lines 83
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416082366 news.xs4all.nl 2966 [2001:888:2000:d::a6]:46369
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80838

Show key headers only | View raw


On 11/15/2014 7:28 AM, Steven D'Aprano wrote:
> Terry Reedy wrote:
>
>> On 11/13/2014 6:11 PM, Rick Johnson 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.
>>>       uniphooey = str
>>
>> It is customary to attribute quotes to their source.  This is from 2.x
>> Lib/idlelib/PyParse.py.  The file was committed (and probably written)
>> by David Scherer 2000-08-15.  Edits for unicode, including the above,
>> were committed (and perhaps written) by Kurt B. Kaiser on 2001-07-13.
>
> Correct.
>
> The line in question was written by Kurt. We can find this out by using
> the hg annotate command. Change into the Lib/idlelib directory of the
> source repository, then use hg annotate command as follows:
>
>
> [steve@ando idlelib]$ hg annotate PyParse.py | grep phoo
> 42050:             uniphooey = s
> 18555:             for raw in map(ord, uniphooey):
>
> The numbers shown on the left are the revision IDs, so look at the
> older of the two:
>
> [steve@ando idlelib]$ hg annotate -r 18555 PyParse.py | grep phoo
> 18555:             uniphooey = str
> 18555:             for raw in map(ord, uniphooey):
>
> We can confirm that prior to that revision, the uniphooey lines
> didn't exist:
>
> [steve@ando idlelib]$ hg annotate -r 18554 PyParse.py | grep phoo
> <no output>
>
>
> And then find out who is responsible:
>
> [steve@ando idlelib]$ hg annotate -uvd -r 18555 PyParse.py | grep phoo
>    Kurt B. Kaiser <kbk@shore.net> Fri Jul 13 20:33:46 2001 +0000:             uniphooey = str
>    Kurt B. Kaiser <kbk@shore.net> Fri Jul 13 20:33:46 2001 +0000:             for raw in map(ord, uniphooey):

On windows, with TortoiseHg installed, I right-clicked PyParse in 
Explorer and selected TortoiseHg on the context menu and Annotate on the 
submenu.  This pops up a Window with two linked panels --  a list of 
revisions and an annotated file listing with lines added or changed by 
the current revision marked a different background color.  I found the 
comment block easily enough, looked at the annotation, and looked back 
at the revision list.  Clicking on a revision changes the file listing. 
  On can easily march through the history of the file.

>> I doubt GvR ever saw this code.  I expect KBK has changed opinions with
>> respect to unicode in 13 years, as has most everyone else.

Including mine.

> We don't know Kurt's intention with regard to the name, the "phooey"
> could refer to:
>
> - the parse functions failing to understand Unicode;
> - it being a nasty hack that assumes that Python will never use
>    Unicode characters for keywords or operators;
> - it being necessary because u''.translate fails to support
>    a deletechars parameter.

I expect I would have been annoyed when a new-fangled feature,
elsewhere in Python, broke one of the files I was working on.
Now, of course, I would know to not use a variable name that
could be misinterpreted by someone years in the future.

> It's unlikely to refer to the Unicode character set itself.


-- 
Terry Jan Reedy

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