Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Serhiy Storchaka
On 16.03.16 09:46, Glenn Linderman wrote: On 3/16/2016 12:09 AM, Serhiy Storchaka wrote: On 16.03.16 08:34, Glenn Linderman wrote: From the PEP 263: More precisely, the first or second line must match the regular expression "coding[:=]\s*([-\w.]+)". The first group of this

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread M.-A. Lemburg
On 16.03.2016 01:28, Guido van Rossum wrote: > I agree that the spirit of the PEP is to stop at the first coding > cookie found. Would it be okay if I updated the PEP to clarify this? > I'll definitely also update the docs. +1 The only reason to read up to two lines was to address the use of the

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Glenn Linderman
On 3/16/2016 12:09 AM, Serhiy Storchaka wrote: On 16.03.16 08:34, Glenn Linderman wrote: From the PEP 263: More precisely, the first or second line must match the regular expression "coding[:=]\s*([-\w.]+)". The first group of this expression is then interpreted as encoding name. If

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Serhiy Storchaka
On 16.03.16 02:28, Guido van Rossum wrote: I agree that the spirit of the PEP is to stop at the first coding cookie found. Would it be okay if I updated the PEP to clarify this? I'll definitely also update the docs. Could you please also update the regular expression in PEP 263 to "^[

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Serhiy Storchaka
On 16.03.16 08:34, Glenn Linderman wrote: From the PEP 263: More precisely, the first or second line must match the regular expression "coding[:=]\s*([-\w.]+)". The first group of this expression is then interpreted as encoding name. If the encoding is unknown to Python, an error

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Glenn Linderman
On 3/15/2016 11:07 PM, Chris Angelico wrote: On Wed, Mar 16, 2016 at 5:03 PM, Serhiy Storchaka wrote: On 15.03.16 22:30, Guido van Rossum wrote: I came across a file that had two different coding cookies -- one on the first line and one on the second. CPython uses the

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Jonathan Goble
On Wed, Mar 16, 2016 at 2:07 AM, Chris Angelico wrote: > Why would you ever have two coding cookies in a file? Surely this > should be either an error, or ill-defined (ie parsers are allowed to > pick whichever they like, including raising)? > > ChrisA +1. If multiple coding

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Chris Angelico
On Wed, Mar 16, 2016 at 5:03 PM, Serhiy Storchaka wrote: > On 15.03.16 22:30, Guido van Rossum wrote: >> >> I came across a file that had two different coding cookies -- one on >> the first line and one on the second. CPython uses the first, but mypy >> happens to use the

Re: [Python-Dev] What does a double coding cookie mean?

2016-03-16 Thread Serhiy Storchaka
On 15.03.16 22:30, Guido van Rossum wrote: I came across a file that had two different coding cookies -- one on the first line and one on the second. CPython uses the first, but mypy happens to use the second. I couldn't find anything in the spec or docs ruling out the second interpretation.

[Python-Dev] Really sketchy Core Python GSoC 2016 ideas page up

2016-03-16 Thread Terri Oda
Hey all, I've put up an incredibly sketchy, terrible ideas page up for Summer of Code with core python: https://wiki.python.org/moin/SummerOfCode/2016/python-core I'm pretty much the worst person to do this since I'm always swamped with admin stuff and particularly out of touch with what's