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


Groups > comp.lang.python > #100579 > unrolled thread

Re: Should stdlib files contain 'narrow non breaking space' U+202F?

Started byTerry Reedy <tjreedy@udel.edu>
First post2015-12-18 01:36 -0500
Last post2015-12-18 01:36 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Should stdlib files contain 'narrow non breaking space' U+202F? Terry Reedy <tjreedy@udel.edu> - 2015-12-18 01:36 -0500

#100579 — Re: Should stdlib files contain 'narrow non breaking space' U+202F?

FromTerry Reedy <tjreedy@udel.edu>
Date2015-12-18 01:36 -0500
SubjectRe: Should stdlib files contain 'narrow non breaking space' U+202F?
Message-ID<mailman.43.1450420600.30845.python-list@python.org>
On 12/17/2015 6:18 PM, Chris Angelico wrote:
> On Fri, Dec 18, 2015 at 10:05 AM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote:
>> The culprit character is hidden between "Issue #" and "20540" at line 400 of
>> C:\Python35\Lib\multiprocessing\connection.py.
>> https://bugs.python.org/issue20540 and
>> https://hg.python.org/cpython/rev/125c24f47f3c refers.
>>
>> I'm asking as I've just spent 30 minutes tracking down why my debug code
>> would bomb when running on 3.5, but not 2.7 or 3.2 through 3.4.
>
> I'm curious as to why this character should bomb your code at all -
> it's in a comment. Is it that your program was expecting ASCII, or is
> it something about that particular character?
>
> Here's a quick listing of the CPython standard library files that aren't ASCII:

Last I knew, Guido still wanted stdlib files to be all-ascii, especially 
possibly in special cases. There is no good reason I can think of for 
there to be an invisible non-ascii space in a comment.  It strikes me as 
most likely an accident (typo) that should be fixed.  I suspect the same 
of most of the following.  Perhaps you should file an issue (and patch?) 
on the tracker.

> rosuav@sikorsky:~/cpython/Lib$ find -name \*.py -not -wholename
> \*test\* -exec file {} \;|grep UTF-8
> ./encodings/punycode.py: Python script, UTF-8 Unicode text executable
> ./encodings/koi8_t.py: Python script, UTF-8 Unicode text executable
> ./msilib/__init__.py: Python script, UTF-8 Unicode text executable
> ./shlex.py: Python script, UTF-8 Unicode text executable
> ./http/client.py: Python script, UTF-8 Unicode text executable
> ./distutils/command/bdist_msi.py: Python script, UTF-8 Unicode text executable
> ./multiprocessing/connection.py: Python script, UTF-8 Unicode text executable
> ./functools.py: Python script, UTF-8 Unicode text executable
> ./heapq.py: Python script, UTF-8 Unicode text executable
> ./email/message.py: Python script, UTF-8 Unicode text executable
> ./getopt.py: Python script, UTF-8 Unicode text executable
> ./urllib/request.py: Python script, UTF-8 Unicode text executable
> ./sre_compile.py: Python script, UTF-8 Unicode text executable
> ./sqlite3/dbapi2.py: Python script, UTF-8 Unicode text executable
> ./sqlite3/__init__.py: Python script, UTF-8 Unicode text executable
>
> Does your program bomb on any of these?
>
> ChrisA
>


-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web