Re: [Python-Dev] Burning down the backlog.

2015-08-17 Thread Nathaniel Smith
On Mon, Aug 17, 2015 at 7:37 PM, Robert Collins wrote: > On 26 July 2015 at 07:28, Robert Collins wrote: >> For my part, I'm going to pick up more or less one thing a day and >> review it, but I think it would be great if other committers were to >> also to do this: if we had 5 of us doing 1 a da

Re: [Python-Dev] Burning down the backlog.

2015-08-17 Thread Ben Finney
Robert Collins writes: > However - 9 isn't a bad number for 'patches that the triagers think > are ready to commit' inventory. > > So yay!. Also - triagers, thank you for feeding patches through the > process. Please keep it up :) If I were a cheerleader I would be able to lead a rousing “Yay, g

Re: [Python-Dev] Burning down the backlog.

2015-08-17 Thread Robert Collins
On 26 July 2015 at 07:28, Robert Collins wrote: > On 21 July 2015 at 19:40, Nick Coghlan wrote: > >> All of this is why the chart that I believe should be worrying people >> is the topmost one on this page: >> http://bugs.python.org/issue?@template=stats >> >> Both the number of open issues and t

Re: [Python-Dev] [Datetime-SIG] PEP 495 (Local Time Disambiguation) is ready for pronouncement

2015-08-17 Thread Alexander Belopolsky
[Posted on Python-Dev] On Sun, Aug 16, 2015 at 3:23 PM, Guido van Rossum wrote: > I think that a courtesy message to python-dev is appropriate, with a link to > the PEP and an invitation to discuss its merits on datetime-sig. Per Gudo's advise, this is an invitation to join PEP 495 discussion on

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Stephen J. Turnbull
Barry Warsaw writes: > On Aug 17, 2015, at 11:02 AM, Paul Moore wrote: > > >print(f"Iteration {n}: Took {end-start) seconds") > > This illustrates (more) problems I have with arbitrary expressions. > > First, you've actually made a typo there; it should be > "{end-start}" -- notice

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Wes Turner
On Aug 17, 2015 2:23 PM, "Nikolaus Rath" wrote: > > On Aug 16 2015, Paul Moore wrote: > > 2. By far and away the most common use for me would be things like > > print(f"Iteration {n}: Took {end-start) seconds"). > > I believe an even more common use willl be > > print(f"Iteration {n+1}: Took {end

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread MRAB
On 2015-08-17 23:06, Steve Dower wrote: On 17Aug2015 0813, Barry Warsaw wrote: On Aug 18, 2015, at 12:58 AM, Chris Angelico wrote: The linters could tell you that you have no 'end' or 'start' just as easily when it's in that form as when it's written out in full. Certainly the mismatched brack

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Steve Dower
On 17Aug2015 1506, Steve Dower wrote: On 17Aug2015 0813, Barry Warsaw wrote: On Aug 18, 2015, at 12:58 AM, Chris Angelico wrote: The linters could tell you that you have no 'end' or 'start' just as easily when it's in that form as when it's written out in full. Certainly the mismatched bracket

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Steve Dower
On 17Aug2015 0813, Barry Warsaw wrote: On Aug 18, 2015, at 12:58 AM, Chris Angelico wrote: The linters could tell you that you have no 'end' or 'start' just as easily when it's in that form as when it's written out in full. Certainly the mismatched brackets could easily be caught by any sort of

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Guido van Rossum
On Mon, Aug 17, 2015 at 1:26 PM, Eric V. Smith wrote: > [...] > I think it would be possible to create a version of this that works for > both i18n and regular interpolation. I think the open issues are: > > 1. Barry wants the substitutions to look like $identifier and possibly > ${identifier}, a

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Eric V. Smith
On 8/17/2015 2:24 PM, Guido van Rossum wrote: > On Mon, Aug 17, 2015 at 7:13 AM, Eric V. Smith > wrote: > > [...] > My current plan is to replace an f-string with a call to .format_map: > >>> foo = 100 > >>> bar = 20 > >>> f'foo: {foo} bar: { bar+1}'

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Guido van Rossum
On Mon, Aug 17, 2015 at 12:23 PM, Nikolaus Rath wrote: > On Aug 16 2015, Paul Moore wrote: > > 2. By far and away the most common use for me would be things like > > print(f"Iteration {n}: Took {end-start) seconds"). > > I believe an even more common use willl be > > print(f"Iteration {n+1}: Too

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Nikolaus Rath
On Aug 16 2015, Paul Moore wrote: > 2. By far and away the most common use for me would be things like > print(f"Iteration {n}: Took {end-start) seconds"). I believe an even more common use willl be print(f"Iteration {n+1}: Took {end-start} seconds") Note that not allowing expressions would tur

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Guido van Rossum
On Mon, Aug 17, 2015 at 8:13 AM, Barry Warsaw wrote: > I'm really asking whether it's technically feasible and realistically > possible > for them to do so. I'd love to hear from the maintainers of pyflakes, > pylint, > Emacs, vim, and other editors, linters, and other static analyzers on a > ro

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Guido van Rossum
On Mon, Aug 17, 2015 at 7:13 AM, Eric V. Smith wrote: > [...] > My current plan is to replace an f-string with a call to .format_map: > >>> foo = 100 > >>> bar = 20 > >>> f'foo: {foo} bar: { bar+1}' > > Would become: > 'foo: {foo} bar: { bar+1}'.format_map({'foo': 100, ' bar+1': 21}) > > The stri

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Barry Warsaw
On Aug 18, 2015, at 12:58 AM, Chris Angelico wrote: >The linters could tell you that you have no 'end' or 'start' just as >easily when it's in that form as when it's written out in full. >Certainly the mismatched brackets could easily be caught by any sort >of syntax highlighter. The rules for f-s

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Chris Angelico
On Tue, Aug 18, 2015 at 12:50 AM, Barry Warsaw wrote: > On Aug 17, 2015, at 11:02 AM, Paul Moore wrote: > >>print(f"Iteration {n}: Took {end-start) seconds") > > This illustrates (more) problems I have with arbitrary expressions. > > First, you've actually made a typo there; it should be "{end

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Barry Warsaw
On Aug 17, 2015, at 11:02 AM, Paul Moore wrote: >print(f"Iteration {n}: Took {end-start) seconds") This illustrates (more) problems I have with arbitrary expressions. First, you've actually made a typo there; it should be "{end-start}" -- notice the trailing curly brace. Second, what if you

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Eric V. Smith
On 08/16/2015 03:37 PM, Guido van Rossum wrote: > On Sun, Aug 16, 2015 at 8:55 PM, Eric V. Smith > wrote: > > Thanks, Paul. Good feedback. > > > Indeed, I smiled when I saw Paul's post. > > > Triple quoted and raw strings work like you'd expect, but you're

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Paul Moore
On 17 August 2015 at 12:48, Larry Hastings wrote: > I think this corner of the debate is covered by the "Consenting adults" > guiding principle we use 'round these parts. Precisely. Paul ___ Python-Dev mailing list Python-Dev@python.org https://mail.pyt

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Larry Hastings
On 08/17/2015 03:02 AM, Paul Moore wrote: On 17 August 2015 at 05:34, Victor Stinner wrote: 2015-08-16 7:21 GMT-07:00 Paul Moore : 3. All of the complex examples look scary, but in practice I wouldn't write stuff like that - why would anyone do so unless they were being deliberately obscure?

Re: [Python-Dev] PEP-498: Literal String Formatting

2015-08-17 Thread Paul Moore
On 17 August 2015 at 05:34, Victor Stinner wrote: > 2015-08-16 7:21 GMT-07:00 Paul Moore : >> 2. By far and away the most common use for me would be things like >> print(f"Iteration {n}: Took {end-start) seconds"). At the moment I use >> str,format() for this, and it's annoyingly verbose. This wou