Re: PEP 526 - var annotations and the spirit of python

2018-07-16 Thread Peter J. Holzer
On 2018-07-15 08:37:05 +0200, Christian Gollwitzer wrote: > Am 05.07.18 um 12:04 schrieb Steven D'Aprano: > > On Thu, 05 Jul 2018 09:17:20 +0200, Christian Gollwitzer wrote: > > But... it compiles? Seriously? [...] > > Sometimes I wonder how C programmers manage to write a bug-free "Hello > > World

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 7:02 PM, Richard Damon wrote: On Jul 16, 2018, at 3:28 PM, Terry Reedy wrote: If one is using a broader definition than usual, it is clearer to say so. This is the core of what I wrote. Do you disagree? You are defining a variable/fixed width codepoint set. No, I did not

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread INADA Naoki
On Tue, Jul 17, 2018 at 2:31 PM Marko Rauhamaa wrote: > > Steven D'Aprano : > > On Mon, 16 Jul 2018 22:51:32 +0300, Marko Rauhamaa wrote: > >> UTF-8 bytes can only represent the first 128 code points of Unicode. > > > > This is DailyWTF material. Perhaps you want to rethink your wording > > and ma

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Tim Chase : > On 2018-07-16 23:59, Marko Rauhamaa wrote: >> Tim Chase : >> > While the python world has moved its efforts into improving >> > Python3, Python2 hasn't suddenly stopped working. >> >> The sword of Damocles is hanging on its head. Unless a consortium is >> erected to support Python

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Steven D'Aprano : > On Mon, 16 Jul 2018 22:51:32 +0300, Marko Rauhamaa wrote: >> UTF-8 bytes can only represent the first 128 code points of Unicode. > > This is DailyWTF material. Perhaps you want to rethink your wording > and maybe even learn a bit more about Unicode and the UTF encodings > befor

Re: can't install/run pip (Latest version of Python)

2018-07-16 Thread Gene Heskett
On Monday 16 July 2018 23:06:19 S Lea wrote: > 'pip' not recognized as internal or external command, operable program > or batch. > > And for some reason it's a 32 bit version > Huh? My ancient wet ram memory is probably out to lunch, but ISTR reading about someone else with the same problem at l

Re: can't install/run pip (Latest version of Python)

2018-07-16 Thread S Lea
of python 3.7 On Mon, Jul 16, 2018 at 8:06 PM, S Lea wrote: > 'pip' not recognized as internal or external command, operable program or > batch. > > And for some reason it's a 32 bit version > > On Mon, Jul 16, 2018 at 8:03 PM, S Lea wrote: > >> Thank you for reaching out. >> >> 1) Don't know w

Re: can't install/run pip (Latest version of Python)

2018-07-16 Thread S Lea
Also, I can't find the location of Python insallation, it refers to C:\Users\Precision\PycharmProjects\my first project from video\venv\Scripts On Mon, Jul 16, 2018 at 8:06 PM, S Lea wrote: > of python 3.7 > > On Mon, Jul 16, 2018 at 8:06 PM, S Lea wrote: > >> 'pip' not recognized as internal o

Re: can't install/run pip (Latest version of Python)

2018-07-16 Thread S Lea
'pip' not recognized as internal or external command, operable program or batch. And for some reason it's a 32 bit version On Mon, Jul 16, 2018 at 8:03 PM, S Lea wrote: > Thank you for reaching out. > > 1) Don't know what do you mean by the traceback. > 2) In DOS, pip install pandas > 3) Yes, i

Re: can't install/run pip (Latest version of Python)

2018-07-16 Thread S Lea
Thank you for reaching out. 1) Don't know what do you mean by the traceback. 2) In DOS, pip install pandas 3) Yes, in DOS, Win 10 4) 3.7 5) Not getting much info On Sun, Jul 15, 2018 at 5:44 PM, boB Stepp wrote: > On Sun, Jul 15, 2018 at 7:34 PM S Lea wrote: > > > > I can't seem to install th

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Tim Chase
On 2018-07-17 01:21, Steven D'Aprano wrote: > > This doesn’t mean that UTF-32 is an awful system, just that it > > isn’t the magical cure that some were hoping for. > > Nobody ever claimed it was, except for the people railing that > since it isn't a magically system we ought to go back to the G

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Tim Chase
On 2018-07-17 01:08, Steven D'Aprano wrote: > In English, I think most people would prefer to use a different > term for whatever "sh" and "ch" represent than "character". The term you may be reaching for is "consonant cluster"? https://en.wikipedia.org/wiki/Consonant_cluster -tkc -- https:/

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Python
On Mon, Jul 16, 2018 at 08:56:11PM +0100, Rhodri James wrote: > The problem everyone is having with you, Marko, is that you are > using the terminology incorrectly. [...] When you call UTF-32 a > variable-width encoding, you are incorrect. But please don't overlook that the "terminology" is in fac

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Richard Damon
> On Jul 16, 2018, at 9:21 PM, Steven D'Aprano > wrote: > >> On Mon, 16 Jul 2018 19:02:36 -0400, Richard Damon wrote: >> >> You are defining a variable/fixed width codepoint set. Many others want >> to deal with CHARACTER sets. > > Good luck coming up with a universal, objective, language-neut

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 22:51:32 +0300, Marko Rauhamaa wrote: > All UTF-8. No unicode strings. That just means you are re-implementing the bits of Unicode you care about (which may be "nothing at all") as UTF-8. If your application is nothing but middleware squirting bytes from one layer to another

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 15:28:51 -0400, Terry Reedy wrote: > On 7/16/2018 1:11 PM, Richard Damon wrote: > >> Many consider that UTF-32 is a variable-width encoding because of the >> combining characters. It can take multiple ‘codepoints’ to define what >> should be a single ‘character’ for display. >

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 19:02:36 -0400, Richard Damon wrote: > You are defining a variable/fixed width codepoint set. Many others want > to deal with CHARACTER sets. Good luck coming up with a universal, objective, language-neutral, consistent definition for a character. > This doesn’t mean that U

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 23:50:12 +0200, Roel Schroeven wrote: > There are times (encoding/decoding network protocols and other data > formats) when I have a byte string and I want/need to process it like > Python 2 does, and that is the one area where I feel Python 3 make > things a bit more difficult

Re: Python 4000 was Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour]

2018-07-16 Thread MRAB
On 2018-07-17 01:25, Steven D'Aprano wrote: On Mon, 16 Jul 2018 15:09:16 -0400, Terry Reedy wrote: On 7/16/2018 11:50 AM, Dennis Lee Bieber wrote: For Python 4000 maybe Please don't give people the idea that there is any current intention to have a 'Python 4000' similar to 'Python 3

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Tim Chase
On 2018-07-16 23:59, Marko Rauhamaa wrote: > Tim Chase : > > While the python world has moved its efforts into improving > > Python3, Python2 hasn't suddenly stopped working. > > The sword of Damocles is hanging on its head. Unless a consortium is > erected to support Python2, no vendor will be

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Tue, 17 Jul 2018 06:15:25 +1000, Chris Angelico wrote: > On Tue, Jul 17, 2018 at 4:55 AM, Steven D'Aprano > wrote: >> There is nothing special about diacritics such that we ought to treat >> some combinations like "Ch" (two code points = one character) as "fixed >> width" while others like "â"

Unicode is not UTF-32 [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 22:40:13 +0300, Marko Rauhamaa wrote: > Terry Reedy : > >> On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: >>> if your new system used Python3's UTF-32 strings as a foundation, >> >> Since 3.3, Python's strings are not (always) UFT-32 strings. > > You are right. Python's strings

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 21:16, Rhodri James wrote: On 16/07/18 20:58, Terry Reedy wrote: On 7/16/2018 1:27 PM, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *in

Python 4000 was Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 15:09:16 -0400, Terry Reedy wrote: > On 7/16/2018 11:50 AM, Dennis Lee Bieber wrote: > >> For Python 4000 maybe > > Please don't give people the idea that there is any current intention to > have a 'Python 4000' similar to 'Python 3000'. Call it 'a mythical > Python 400

Re: Users banned

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 20:03:39 +0100, Steve Simmons wrote: > +1  Seems to me Bart is being banned for "being a dick" and "talking > rubbish" (my words/interpretation) with irritating persistence. I know that when I first started here, I often talked rubbish. The difference is, I was willing to lis

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 9:18 AM, Dan Sommers wrote: > Quick: how long is the byte array that displays as '\xff'? Too easy? > What about '\0xff' and '0\xff'? 1, 4, 2 bytes respectively. Yep, easy... but then, I'm used to reading backslash escapes. Nothing to do with text vs bytes. DNS, of cours

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Dan Sommers
On Tue, 17 Jul 2018 08:48:55 +1000, Chris Angelico wrote: > That said, though, the fact that indexing a byte string yields an int > instead of a one-byte string is basically unable to be changed now ... Agreed. > ... and IMO it'd be better to be consistent with text strings than > with bytearray

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread MRAB
On 2018-07-16 21:59, Marko Rauhamaa wrote: Tim Chase : While the python world has moved its efforts into improving Python3, Python2 hasn't suddenly stopped working. The sword of Damocles is hanging on its head. Unless a consortium is erected to support Python2, no vendor will be able to use it

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Richard Damon
> On Jul 16, 2018, at 3:28 PM, Terry Reedy wrote: > >> On 7/16/2018 1:11 PM, Richard Damon wrote: >> >> Many consider that UTF-32 is a variable-width encoding because of the >> combining characters. It can take multiple ‘codepoints’ to define what >> should be a single ‘character’ for display

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 8:41 AM, Roel Schroeven wrote: > In any case, even though Python 3's byte strings are not quite unlike Python > 2's strings, they're not exactly like them either. And I feel there are > cases where that makes things somewhat harder, even though I can't prove it. You're abs

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Roel Schroeven
Chris Angelico schreef op 16/07/2018 23:57: On Tue, Jul 17, 2018 at 7:50 AM, Roel Schroeven wrote: Steven D'Aprano schreef op 16/07/2018 2:18: On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: Python3 is intrinsically tied to Unicode for string handling. Therefore, the Python programmer is

Re: doubling the number of tests, but not taking twice as long

2018-07-16 Thread Larry Martell
On Mon, Jul 16, 2018 at 6:01 PM, Gilmeh Serda wrote: > On Mon, 16 Jul 2018 14:17:57 -0400, Larry Martell wrote: > >> This code needs to process many tens of 1000's of files, and it runs >> often, so it needs to run very fast. Needless to say, my change has made >> it take 2x as long. Can anyone se

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 7:02 AM, Ethan Furman wrote: > On 07/16/2018 01:15 PM, Chris Angelico wrote: >> >> On Tue, Jul 17, 2018 at 4:55 AM, Steven D'Aprano wrote: > > >>> There is nothing special about diacritics such that we ought to treat >>> some combinations like "Ch" (two code points = one ch

Re: Reading EmailMessage from file

2018-07-16 Thread Roel Schroeven
Skip Montanaro schreef op 16/07/2018 3:31: So, problem solved. The example I originally referred to clearly requires the caller know the encoding of the input file. When you don't know the encoding, you need bytes. The BytesParser gave me that. Also, I must admit to having not completely read th

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Grant Edwards
On 2018-07-16, Roel Schroeven wrote: > There are times (encoding/decoding network protocols and other data > formats) when I have a byte string and I want/need to process it like > Python 2 does, and that is the one area where I feel Python 3 make > things a bit more difficult. I use Python t

Re: Users banned

2018-07-16 Thread Terry Reedy
On 7/16/2018 3:27 PM, Grant Edwards wrote: On 2018-07-16, Steve Simmons wrote: +1  Seems to me Bart is being banned for "being a dick" and "talking rubbish" (my words/interpretation) with irritating persistence. Wonder how many of the non-banned members have been guilty of the same thing in on

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 7:50 AM, Roel Schroeven wrote: > Steven D'Aprano schreef op 16/07/2018 2:18: >> >> On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: >> >>> Python3 is intrinsically tied to Unicode for string handling. Therefore, >>> the Python programmer is forced to deal with it (in all

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Roel Schroeven
Steven D'Aprano schreef op 16/07/2018 2:18: On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: Python3 is intrinsically tied to Unicode for string handling. Therefore, the Python programmer is forced to deal with it (in all but trivial cases), rather than given a choice. So I don't understand

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Ethan Furman : > Depends on the language: in Spanish, "ch" is it's own letter (at least > it was when I grew up), so any word containing it should still contain > it when reversed: "chica" would be "acich". The Royal Academy broke "ch" and "ll" up into separate letters a decade or so back. It had

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:32 AM, Tim Chase wrote: > On 2018-07-16 18:31, Steven D'Aprano wrote: >> You say that all you want is a switch to turn off Unicode (and >> replace it with what? Kanji strings? Cyrillic? Shift_JS? no of >> course not, I'm being absurd -- replace it with ASCII, what else >>

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:54 AM, Marko Rauhamaa wrote: > Chris Angelico : >> Challenge: Reverse a string in UTF-8. > > Counter-challenge: Reverse a Unicode string: > >>>> s = "a\u0304e" >>>> s >'āe' >>>> L = list(s) >>>> L.reverse() >>>> "".join(L) >'ēa' > >> Challeng

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:27 AM, Marko Rauhamaa wrote: > Rhodri James : > >> On 16/07/18 20:40, Marko Rauhamaa wrote: >>> You mean each code point is one code point wide. But that's rather an >>> irrelevant thing to state. The main point is that UTF-32 (aka Unicode) >>> uses one or more code point

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Ethan Furman
On 07/16/2018 01:15 PM, Chris Angelico wrote: On Tue, Jul 17, 2018 at 4:55 AM, Steven D'Aprano wrote: There is nothing special about diacritics such that we ought to treat some combinations like "Ch" (two code points = one character) as "fixed width" while others like "â" (two code points = on

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:36 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Tue, Jul 17, 2018 at 5:40 AM, Marko Rauhamaa wrote: >>> You mean each code point is one code point wide. But that's rather an >>> irrelevant thing to state. The main point is that UTF-32 (aka >>> Unicode) uses one o

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Tim Chase : > While the python world has moved its efforts into improving Python3, > Python2 hasn't suddenly stopped working. The sword of Damocles is hanging on its head. Unless a consortium is erected to support Python2, no vendor will be able to use it in the medium term. Given the recent even

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Chris Angelico : > Challenge: Reverse a string in UTF-8. Counter-challenge: Reverse a Unicode string: >>> s = "a\u0304e" >>> s 'āe' >>> L = list(s) >>> L.reverse() >>> "".join(L) 'ēa' > Challenge: Center text in UTF-8. Counter-challenge: Center a Unicode string: >>> t

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Tim Chase
On 2018-07-16 18:31, Steven D'Aprano wrote: > You say that all you want is a switch to turn off Unicode (and > replace it with what? Kanji strings? Cyrillic? Shift_JS? no of > course not, I'm being absurd -- replace it with ASCII, what else > could any right-thinking person want, right?). But we a

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Jul 17, 2018 at 5:40 AM, Marko Rauhamaa wrote: >> You mean each code point is one code point wide. But that's rather an >> irrelevant thing to state. The main point is that UTF-32 (aka >> Unicode) uses one or more code points to represent what people would >> consider a

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 4:55 AM, Steven D'Aprano wrote: > There is nothing special about diacritics such that we ought to treat > some combinations like "Ch" (two code points = one character) as "fixed > width" while others like "â" (two code points = one character) as > "variable width". When yo

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 2:01 PM, Chris Angelico wrote: 🌱【 Stardew Valley Fanart 】🌱*:・゚✧【 800 Subpoints = NEW EMOTE 】#devicat #anime #stardewvalley #fantasy Just to be clear, 🌱【 】🌱・゚✧【 】, \U0001f331, \u3010, \u3011, \uff65, \uff9f, \u2727 are the non-ascii chars in the above. for c in """🌱【 Stardew Val

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Marko Rauhamaa
Rhodri James : > On 16/07/18 20:40, Marko Rauhamaa wrote: >> You mean each code point is one code point wide. But that's rather an >> irrelevant thing to state. The main point is that UTF-32 (aka Unicode) >> uses one or more code points to represent what people would consider an >> individual char

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 5:51 AM, Marko Rauhamaa wrote: > Steven D'Aprano : >> Under that standard definition, UTF-8 and UTF-16 are variable-width, >> and UTF-32 is fixed-width. >> >> But I'll accept that UTF-32 is variable-width if Marko accepts that >> ASCII is too. > > If that makes you happy, f

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 20:51, Marko Rauhamaa wrote: I use UTF-8 in my C programs and sense no disadvantage. I have never felt a need for wchar_t. That's not a good comparison, though, because wchar_t in C really doesn't give you much (if any) advantage over rolling your own UTF-8 support, even when that

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:16 AM, Rhodri James wrote: > On 16/07/18 20:58, Terry Reedy wrote: >> >> On 7/16/2018 1:27 PM, Jim Lee wrote: >> >>> 90% of the world *is* "beneath my notice" when it comes to programming >>> for myself. I really don't care if that's not PC enough for you. >>> >>> Had y

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 5:40 AM, Marko Rauhamaa wrote: > Terry Reedy : > >> On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: >>> if your new system used Python3's UTF-32 strings as a foundation, >> >> Since 3.3, Python's strings are not (always) UFT-32 strings. > > You are right. Python's strings are a

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 20:58, Terry Reedy wrote: On 7/16/2018 1:27 PM, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *intent* rather than *reaction*, you would

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Anders Wegge Keller
På Mon, 16 Jul 2018 11:33:46 -0700 Jim Lee skrev: > Go right ahead.  I find it surprising that Stephen isn't banned, > considering the fact that he ridicules anyone he doesn't agree with.  > But I guess he's one of the 'good 'ol boys', and so exempt from the code > of conduct. Well said! --

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:27 PM, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *intent* rather than *reaction*, you would notice that I suggested the *option* of

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Rhodri James
On 16/07/18 20:40, Marko Rauhamaa wrote: Terry Reedy: On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: if your new system used Python3's UTF-32 strings as a foundation, Since 3.3, Python's strings are not (always) UFT-32 strings. You are right. Python's strings are a superset of UTF-32. More accu

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 5:16 AM, Gene Heskett wrote: > On Monday 16 July 2018 14:01:54 Chris Angelico wrote: > >> On Tue, Jul 17, 2018 at 2:24 AM, Gene Heskett > wrote: >> > On Monday 16 July 2018 11:57:25 Chris Angelico wrote: >> >> On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett >> >> >> > >> >

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Steven D'Aprano : > Under that standard definition, UTF-8 and UTF-16 are variable-width, > and UTF-32 is fixed-width. > > But I'll accept that UTF-32 is variable-width if Marko accepts that > ASCII is too. If that makes you happy, fine. The point is, UTF-32 has no advantages over UTF-8. And I'm re

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:13 PM, Jim Lee wrote: I just think that a language should allow one to bypass Unicode handling easily *when it's not needed*. Both for patching IDLE and for my currently private work, I usually only use Ascii, and no unicode escapes. When I do, it does not matter whether edit

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 18:38, Rhodri James wrote: Actually having an option of turning off Unicode *does* make it harder to use, because you end up coming across programs that have Unicode and surprise you when they misbehave.  And yes I saw that 90% of your programs aren't intended to get out into the wo

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 11:31, Steven D'Aprano wrote: On Mon, 16 Jul 2018 10:27:18 -0700, Jim Lee wrote: Had you actually read my words with *intent* rather than *reaction*, you would notice that I suggested the *option* of turning off Unicode. Yes, I know what you wrote, and I read it with intent. Ji

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Marko Rauhamaa
Terry Reedy : > On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: >> if your new system used Python3's UTF-32 strings as a foundation, > > Since 3.3, Python's strings are not (always) UFT-32 strings. You are right. Python's strings are a superset of UTF-32. More accurately, Python's strings are UTF-32

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 10:40, Mark Lawrence wrote: On 16/07/18 18:27, Jim Lee wrote: Obviously, the most vocal representatives of the Python community are too sensitive about their language to enable rational discussion. Please moderators ban this person as he's going down the same line as bartc and s

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 19:31, Steven D'Aprano wrote: I'm simply not seeing the advantage of: from __future__ import no_unicode print("Hello World!") # stand in for any string handling on ASCII Sure this should be "from __past__ import no_unicode"? gd&r -- Rhodri James *-* Kynesim Ltd -- http

Re: Users banned

2018-07-16 Thread Grant Edwards
On 2018-07-16, Steve Simmons wrote: > +1  Seems to me Bart is being banned for "being a dick" and "talking > rubbish" (my words/interpretation) with irritating persistence. Wonder > how many of the non-banned members have been guilty of the same thing in > one way or another. I'm sure many of

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:11 PM, Richard Damon wrote: Many consider that UTF-32 is a variable-width encoding because of the combining characters. It can take multiple ‘codepoints’ to define what should be a single ‘character’ for display. I hope you realize that this is not the standard meaning of 'va

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Gene Heskett
On Monday 16 July 2018 15:04:53 Terry Reedy wrote: > On 7/16/2018 10:54 AM, Gene Heskett wrote: > > On Monday 16 July 2018 10:24:28 Marko Rauhamaa wrote: > >> Plus the bytes syntax is really ugly. I wish Python3 had reserved > >> '...' for byte strings and "..." for UTF-32 strings. > > Aside from

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Gene Heskett
On Monday 16 July 2018 14:01:54 Chris Angelico wrote: > On Tue, Jul 17, 2018 at 2:24 AM, Gene Heskett wrote: > > On Monday 16 July 2018 11:57:25 Chris Angelico wrote: > >> On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett > >> > > > > wrote: > >> > On Sunday 15 July 2018 16:09:21 Chris Angelico wro

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 11:50 AM, Dennis Lee Bieber wrote: For Python 4000 maybe Please don't give people the idea that there is any current intention to have a 'Python 4000' similar to 'Python 3000'. Call it 'a mythical Python 4000', if you must use such a term. -- Terry Jan Reedy -- https

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 10:54 AM, Gene Heskett wrote: On Monday 16 July 2018 10:24:28 Marko Rauhamaa wrote: Plus the bytes syntax is really ugly. I wish Python3 had reserved '...' for byte strings and "..." for UTF-32 strings. Aside from the fact that Python3 strings are not UTF-32 strings, this would

Re: Users banned

2018-07-16 Thread Steve Simmons
On 16/07/2018 03:13, Devin Jeanpierre wrote: On Sun, Jul 15, 2018 at 5:09 PM Jim Lee wrote: That is, of course, the decision of the moderators - but I happen to agree with both Christian and Ethan. Banning for the simple reason of a dissenting opinion is censorship, pure and simple. While Bar

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 14:22:27 -0400, Richard Damon wrote: [...] > But I am not talking about those sort of characters or ligatures, So what? I am. You don't get to say "only non-standard definitions I approve of count". There is the industry standard definition of what it means to be a fixed-

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 4:22 AM, Richard Damon wrote: > > But I am not talking about those sort of characters or ligatures, but > ‘characters’ that are built up of a combining diacritical marks (like > accents) and a base character. Unicode define many code points for the more > common of these

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/15/2018 4:09 PM, Jim Lee wrote: On 07/15/18 12:37, MRAB wrote: To me, Unicode and UTF-8 aren't things to be reserved for I18N. I use them as a matter of course because I find it a lot easier to stick with just one encoding, one that will work with _any_ text I have. Which is exactly th

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 4:15 AM, Ian Kelly wrote: > On Mon, Jul 16, 2018 at 12:02 PM Terry Reedy wrote: >> >> On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: >> >> > if your new system used Python3's UTF-32 strings as a foundation, >> >> Since 3.3, Python's strings are not (always) UFT-32 strings. N

Re: doubling the number of tests, but not taking twice as long

2018-07-16 Thread Stephan Houben
Op 2018-07-16, Larry Martell schreef : > I had some code that did this: > > meas_regex = '_M\d+_' > meas_re = re.compile(meas_regex) > > if meas_re.search(filename): > stuff1() > else: > stuff2() > > I then had to change it to this: > > if meas_re.search(filename): > if 'MeasDisplay' in

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 10:27:18 -0700, Jim Lee wrote: > Had you actually read my words with *intent* rather than *reaction*, you > would notice that I suggested the *option* of turning off Unicode. Yes, I know what you wrote, and I read it with intent. Jim, you seem to be labouring under the misapp

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Richard Damon
> On Jul 16, 2018, at 1:36 PM, Steven D'Aprano > wrote: > > On Mon, 16 Jul 2018 13:11:23 -0400, Richard Damon wrote: > >>> On Jul 16, 2018, at 12:51 PM, Steven D'Aprano >>> wrote: >>> On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: if your new system used Python3's

doubling the number of tests, but not taking twice as long

2018-07-16 Thread Larry Martell
I had some code that did this: meas_regex = '_M\d+_' meas_re = re.compile(meas_regex) if meas_re.search(filename): stuff1() else: stuff2() I then had to change it to this: if meas_re.search(filename): if 'MeasDisplay' in filename: stuff1a() else: stuff1() else:

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Ian Kelly
On Mon, Jul 16, 2018 at 12:02 PM Terry Reedy wrote: > > On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: > > > if your new system used Python3's UTF-32 strings as a foundation, > > Since 3.3, Python's strings are not (always) UFT-32 strings. Nor are > they always UCS-2 (or partly UTF-16) strings. Nor

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 18:27, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *intent* rather than *reaction*, you would notice that I suggested the *option* of tur

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 2:24 AM, Gene Heskett wrote: > On Monday 16 July 2018 11:57:25 Chris Angelico wrote: > >> On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett > wrote: >> > On Sunday 15 July 2018 16:09:21 Chris Angelico wrote: >> >> On Mon, Jul 16, 2018 at 4:22 AM, James Lee wrote: >> >> > On 7

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: if your new system used Python3's UTF-32 strings as a foundation, Since 3.3, Python's strings are not (always) UFT-32 strings. Nor are they always UCS-2 (or partly UTF-16) strings. Nor are the always Latin-1 or Ascii strings. Python's Flexible S

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 18:13, Jim Lee wrote: I just think that a language should allow one to bypass Unicode handling easily *when it's not needed*. I have no idea what this is meant to mean. I've written loads of code for my own purposes and I've never had to think about Unicode, so why should an

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 18:27, Jim Lee wrote: Obviously, the most vocal representatives of the Python community are too sensitive about their language to enable rational discussion. Please moderators ban this person as he's going down the same line as bartc and similar, it is completely unacceptable, he's

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 13:11:23 -0400, Richard Damon wrote: >> On Jul 16, 2018, at 12:51 PM, Steven D'Aprano >> wrote: >> >>> On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: >>> >>> if your new system used Python3's UTF-32 strings as a foundation, that >>> would be an equally naïve misst

Re: IDLE Python won't run or open, neither will it state the error for behaving this way

2018-07-16 Thread Terry Reedy
On 7/16/2018 5:22 AM, Clarence Chanda wrote: HI, I downloaded python 3.7.0 from your python website Which installer for what OS? and it was installed successfully and I was able to run/open python How did you run it? but when I try to run/open IDLE python, How? it just wont open or ru

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread MRAB
On 2018-07-16 17:31, Steven D'Aprano wrote: On Sun, 15 Jul 2018 16:38:41 -0700, Jim Lee wrote: As I said, there are programming situations where the programmer only needs to deal with a single language - his own. This might come as a shock to you, but just because Python's native string type

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 03:39, Steven D'Aprano wrote: Good for you. But Python is not a programming language written to satisfy the needs of people like you, and ONLY people like you. It is a language written to satisfy the needs of people from Uzbekistan, and China, and Japan, and India, and Brazil, and

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 03:26, Steven D'Aprano wrote: But the thing is, that complexity is *inherent in the domain*. You can try to deal with it without Unicode, and as soon as you have users expecting to use more than one code page, you're doomed. No, I'm not doomed, because there *are* no other users

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Tue, 17 Jul 2018 02:22:59 +1000, Chris Angelico wrote: > On Tue, Jul 17, 2018 at 2:05 AM, Mark Lawrence > wrote: >> Out of curiosity where does my mum's Welsh come into the equation as I >> believe that it is not recognised by the EU as a language? >> >> > What characters does it use? Mostly L

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Richard Damon
> On Jul 16, 2018, at 12:51 PM, Steven D'Aprano > wrote: > >> On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: >> >> if your new system used Python3's UTF-32 strings as a foundation, that >> would be an equally naïve misstep. You'd need to reach a notch higher >> and use glyphs or othe

Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: > if your new system used Python3's UTF-32 strings as a foundation, that > would be an equally naïve misstep. You'd need to reach a notch higher > and use glyphs or other "semiotic atoms" as building blocks. UTF-32, > after all, is a variab

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 17:22, Chris Angelico wrote: On Tue, Jul 17, 2018 at 2:05 AM, Mark Lawrence wrote: On 16/07/18 15:17, Dan Sommers wrote: On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enou

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 17:26, Larry Martell wrote: On Mon, Jul 16, 2018 at 12:05 PM, Mark Lawrence wrote: On 16/07/18 15:17, Dan Sommers wrote: On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enou

I18N and Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Sun, 15 Jul 2018 17:28:15 -0700, Jim Lee wrote: > Unicode is an attempt to solve at least one I18N issue If you're going to insist on digging your heels in and using definitions which nobody else does, this discussion is going to go nowhere fast. Unicode is (ideally) a universal character se

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 17:05, Mark Lawrence wrote: On 16/07/18 15:17, Dan Sommers wrote: On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enough for his disciples, but Jesus spoke Aramaic. Also, ISO-8

  1   2   >