[RELEASE] Python 3.6.2 is now available

2017-07-16 Thread Ned Deily
On behalf of the Python development community and the Python 3.6 release team, I am happy to announce the availability of Python 3.6.2, the second maintenance release of Python 3.6. 3.6.0 was released on 2016-12-22 to great interest and we are now providing the second set of bugfixes and documenta

Re: Connecting Google News

2017-07-16 Thread dieter
Javier Bezos writes: > Google News used to fail with the high level functions provided by > httplib and the like. However, I found this piece of code somewhere: > ... > A few days ago, Google News has been revamped and it doesn't work any > more (2.6/Win7, 2.7/OSX and, with minimal changes, 3.6/Wi

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Chris Angelico
On Mon, Jul 17, 2017 at 2:10 PM, Rustom Mody wrote: > Hint1: Ask your grandmother whether unicode's notion of character makes sense. > Ask 10 gmas from 10 language-L's > Hint2: When in doubt gma usually is right Often, but definitely not always. For instance, your grandmother probably wouldn't th

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rustom Mody
On Monday, July 17, 2017 at 6:58:57 AM UTC+5:30, Steve D'Aprano wrote: > On Mon, 17 Jul 2017 01:40 am, Rustom Mody wrote: > > > On Sunday, July 16, 2017 at 8:10:41 PM UTC+5:30, Rick Johnson wrote: > [...] > > $ python > > Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 12:22:00) > >

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Chris Angelico
On Mon, Jul 17, 2017 at 12:28 PM, Mikhail V wrote: > ChrisA wrote: >>Tell me, is "å" an a with some 'dirt', or is it a separate character? > > From the way you are asking, it seems that you are planning some tricky > business again... Hope not to argue on terminology again, å simply > makes the t

Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Mikhail V
ChrisA wrote: >On Sun, Jul 16, 2017 at 2:33 PM, Rustom Mody wrote: >> Right now in an adjacent mailing list (debian) I see someone signed off with >> a >> >> grüß >> >> I guess the third character is a u with some ‘dirt’ >> Whats the fourth? >It's a "sharp S". or "Eszett", is a merge of two s

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rick Johnson
On Sunday, July 16, 2017 at 8:28:57 PM UTC-5, Steve D'Aprano wrote: > On Mon, 17 Jul 2017 01:40 am, Rustom Mody wrote: > > > On Sunday, July 16, 2017 at 8:10:41 PM UTC+5:30, Rick Johnson wrote: > [...] > > $ python > > Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 12:22:00) > > [G

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Steve D'Aprano
On Mon, 17 Jul 2017 01:40 am, Rustom Mody wrote: > On Sunday, July 16, 2017 at 8:10:41 PM UTC+5:30, Rick Johnson wrote: [...] > $ python > Python 3.6.0 |Anaconda 4.3.1 (64-bit)| (default, Dec 23 2016, 12:22:00) > [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux > Type "help", "copyright", "credits

Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Mikhail V
>> On Sat, 15 Jul 2017 05:50 pm, Marko Rauhamaa wrote: >>> Random access to code points is as uninteresting as random access to >>> UTF-8 bytes. I might want random access to the "Grapheme clusters, >>> a.k.a.real characters". >> >> What _real_ characters are you referring to? >> If your data has "

Re: Write this accumuator in a functional style

2017-07-16 Thread Pavol Lisy
On 7/14/17, Steve D'Aprano wrote: > On Fri, 14 Jul 2017 09:06 am, Ned Batchelder wrote: > >> Steve's summary is qualitatively right, but a little off on the >> quantitative >> details. Lists don't resize to 2*N, they resize to ~1.125*N: >> >> new_allocated = (size_t)newsize + (newsize >> 3) +

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Ben Finney
Ben Finney writes: > Steven D'Aprano writes: > > > Do you have references for those claims? > > The Unicode Standard http://www.unicode.org/versions/Unicode10.0.0/> > frequently uses “character” as the unit of semantic value that Unicode > deals in. See the “Contents” table for many references.

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Ben Finney
Steven D'Aprano writes: > On Sun, 16 Jul 2017 12:33:10 +1000, Ben Finney wrote: > > > And yet the ASCII and Unicode standard says code point 0x0A (U+000A > > LINE FEED) is a character, by definition. > [...] > > > Is an acute accent a character? > > > > Yes, according to Unicode. ‘´’ (U+0301 ACU

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rick Johnson
On Sunday, July 16, 2017 at 10:41:02 AM UTC-5, Rustom Mody wrote: > On Sunday, July 16, 2017 at 8:10:41 PM UTC+5:30, Rick Johnson wrote: > > On Sunday, July 16, 2017 at 2:55:57 AM UTC-5, Marko Rauhamaa wrote: > > > Mikhail V : > > > > On Sat, 15 Jul 2017 05:50 pm, Marko Rauhamaa wrote: [...] > >

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rustom Mody
On Sunday, July 16, 2017 at 8:10:41 PM UTC+5:30, Rick Johnson wrote: > On Sunday, July 16, 2017 at 2:55:57 AM UTC-5, Marko Rauhamaa wrote: > > Mikhail V : > > > On Sat, 15 Jul 2017 05:50 pm, Marko Rauhamaa wrote: > > > > > > > > Random access to code points is as uninteresting as > > > > random acc

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rick Johnson
On Sunday, July 16, 2017 at 2:55:57 AM UTC-5, Marko Rauhamaa wrote: > Mikhail V : > > On Sat, 15 Jul 2017 05:50 pm, Marko Rauhamaa wrote: > > > > > > Random access to code points is as uninteresting as > > > random access to UTF-8 bytes. I might want random access > > > to the "Grapheme clusters, a

Re: Difference in behavior of GenericMeta between 3.6.0 and 3.6.1

2017-07-16 Thread Oren Ben-Kiki
Yes, it sort-of makes sense... I'll basically re-post my question there. Thanks for the link! Oren. On Sun, Jul 16, 2017 at 4:29 PM, Peter Otten <__pete...@web.de> wrote: > Oren Ben-Kiki wrote: > > > TL;DR: We need improved documentation of the way meta-classes behave for > > generic classes,

Re: Difference in behavior of GenericMeta between 3.6.0 and 3.6.1

2017-07-16 Thread Peter Otten
Oren Ben-Kiki wrote: > TL;DR: We need improved documentation of the way meta-classes behave for > generic classes, and possibly reconsider the way "__setattr__" and > "__getattribute__" behave for such classes. The typing module is marked as "provisional", so you probably have to live with the i

Re: Connecting Google News

2017-07-16 Thread Skip Montanaro
Peter> Most of the actual content seems to be buried in javascript though. Peeking at it, almost all of the useful content appears to be data. It doesn't seem like snipping it out and interpreting it as JSON would be terribly difficult. Perhaps no JS engine required. Skip -- https://mail.python.

Re: Connecting Google News

2017-07-16 Thread Javier Bezos
Peter, http.request("GET","/news/headlines?ned=es_mx&hl=es" , Thank you. It works, too. Javier -- https://mail.python.org/mailman/listinfo/python-list

Re: Connecting Google News

2017-07-16 Thread Javier Bezos
Chris, (Also, please upgrade your Windows box to run Python 2.7.) It's not /my/ Windows box. I'm allowed to run my script, that's all. My Windows box is actually that with 3.6. http = httplib.HTTPSConnection('news.google.com') http.request("GET","/news?ned=es_MX" , ('Loc

Re: Connecting Google News

2017-07-16 Thread Chris Warrick
On 16 July 2017 at 11:26, Javier Bezos wrote: > Google News used to fail with the high level functions provided by httplib > and the like. However, I found this piece of code somewhere: > > def gopen(): > http = httplib.HTTPSConnection('news.google.com') > http.request("GET","/news

Difference in behavior of GenericMeta between 3.6.0 and 3.6.1

2017-07-16 Thread Oren Ben-Kiki
TL;DR: We need improved documentation of the way meta-classes behave for generic classes, and possibly reconsider the way "__setattr__" and "__getattribute__" behave for such classes. I am using meta-programming pretty heavily in one of my projects. It took me a while to figure out the dance betwe

Re: Connecting Google News

2017-07-16 Thread Peter Otten
Javier Bezos wrote: > Google News used to fail with the high level functions provided by httplib > and the like. However, I found this piece of code somewhere: > > def gopen(): >http = httplib.HTTPSConnection('news.google.com') >http.request("GET","/news?ned=es_MX" , When yo

Connecting Google News

2017-07-16 Thread Javier Bezos
Google News used to fail with the high level functions provided by httplib and the like. However, I found this piece of code somewhere: def gopen(): http = httplib.HTTPSConnection('news.google.com') http.request("GET","/news?ned=es_MX" , headers =

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Marko Rauhamaa
Mikhail V : > On Sat, 15 Jul 2017 05:50 pm, Marko Rauhamaa wrote: >> Random access to code points is as uninteresting as random access to >> UTF-8 bytes. I might want random access to the "Grapheme clusters, >> a.k.a.real characters". > > What _real_ characters are you referring to? > If your data

Re: is @ operator popular now?

2017-07-16 Thread Terry Reedy
On 7/15/2017 7:35 AM, oyster wrote: as the title says. has @ been used in projects? @ was added as an operator for the benefit of numpy, which is a hugh project. I am pretty sure that it is used there, but you can ask on some numpy list. -- Terry Jan Reedy -- https://mail.python.org/mail

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rustom Mody
The first book I studied as a CS-student was Structured Computer Organization by Tanenbaum Apart from the detailed description of various machines like PDP-11, IBM-360 etc it suggested the understanding of the computer at 4 levels: - Microprogramming level - "Conventional" machine level (nowadays