Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-19 Thread Serhiy Storchaka
On 19.09.15 14:03, Eric V. Smith wrote: While finishing up the implementation of PEP 498, I realized that the PEP has an error. It says that this code: f'abc{expr1:spec1}{expr2!r:spec2}def{expr3:!s}ghi' Is equivalent to: 'abc' + expr1.__format__(spec1) + repr(expr2).__format__(spec2) + 'def'

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-19 Thread Eric V. Smith
On 9/19/2015 3:36 PM, Eric V. Smith wrote: > On 9/19/2015 3:22 PM, Serhiy Storchaka wrote: >> On 19.09.15 14:03, Eric V. Smith wrote: >>> Instead of calling __format__, I've changed the code generator to call >>> format(expr1, spec1). As an optimization, I might add special opcodes to >>> deal

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-19 Thread Eric V. Smith
On 9/19/2015 3:22 PM, Serhiy Storchaka wrote: > On 19.09.15 14:03, Eric V. Smith wrote: >> While finishing up the implementation of PEP 498, I realized that the >> PEP has an error. It says that this code: >> >> f'abc{expr1:spec1}{expr2!r:spec2}def{expr3:!s}ghi' >> >> Is equivalent to: >> >> 'abc'

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-19 Thread Chris Angelico
On Sun, Sep 20, 2015 at 5:36 AM, Eric V. Smith wrote: > As the PEP says, the expression with '+' is illustrative, not how it's > actually implemented. The implementation currently uses ''.join, > although I reserve the right to change it. > >> or even to >> >>

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Paul Moore
On 19 September 2015 at 19:37, Brett Cannon wrote: > Guys, this thread is about removing the pyvenv script, not pip. If you want > to start a discussion about pip and its command structure that should > probably happen on pip's issue tracker or over at distutils-sig. Sorry,

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Brett Cannon
Guys, this thread is about removing the pyvenv script, not pip. If you want to start a discussion about pip and its command structure that should probably happen on pip's issue tracker or over at distutils-sig. On Sat, 19 Sep 2015 at 10:37 Sven R. Kunze wrote: > On 19.09.2015

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Stephen J. Turnbull
Terry Reedy writes: > Am I correct in guessing that on Windows, at least, R and Emacs do *not* > run in Command Prompt? I'm not sure what you mean by that. Of course they do run under Command Prompt, but the limitations of the command window are so severe that almost nobody ever does that,

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Sven R. Kunze
On 19.09.2015 07:24, Stephen J. Turnbull wrote: Barry Warsaw writes: > One thing that came up in a similar discussion is pip, and the > suggested move to `python -m pip`, which makes a lot of sense. > However, *inside* a virtualenv, there's no ambiguity about the > Python version

[Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-19 Thread Eric V. Smith
While finishing up the implementation of PEP 498, I realized that the PEP has an error. It says that this code: f'abc{expr1:spec1}{expr2!r:spec2}def{expr3:!s}ghi' Is equivalent to: 'abc' + expr1.__format__(spec1) + repr(expr2).__format__(spec2) + 'def' + str(expr3).__format__('') + 'ghi' But

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Paul Moore
On 19 September 2015 at 06:49, Terry Reedy wrote: > On 9/19/2015 1:24 AM, Stephen J. Turnbull wrote: >> >> Barry Warsaw writes: >> >> > One thing that came up in a similar discussion is pip, and the >> > suggested move to `python -m pip`, which makes a lot of sense. >> >

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Paul Moore
On 19 September 2015 at 10:12, Sven R. Kunze wrote: > The only question I have: is there a particular reason (not technical one) > why there are many pips on my PC? That's not an unreasonable question, but (IMO) most of the answers are technical, or amount to "why would you

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Sven R. Kunze
On 19.09.2015 14:44, Paul Moore wrote: On 19 September 2015 at 10:12, Sven R. Kunze wrote: The only question I have: is there a particular reason (not technical one) why there are many pips on my PC? That's not an unreasonable question, but (IMO) most of the answers are

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Paul Moore
On 19 September 2015 at 18:15, Sven R. Kunze wrote: >> So, to directly answer: >> >> Because there are technical challenges that no-one has stepped up to >> solve. > > > Let's solve them. :) I thought my point was "yes, go for it - your code contribution would be

Re: [Python-Dev] Proposing the deprecation of the pyvenv script

2015-09-19 Thread Sven R. Kunze
On 19.09.2015 19:19, Paul Moore wrote: I thought my point was "yes, go for it - your code contribution would be appreciated" :-) Paul Well, before coding shouldn't we have vision and a plan for pip somehow and pinpoint it somewhere where everybody who's willing to contribute can see it?

Re: [Python-Dev] My collection of Python 3.5.0 regressions

2015-09-19 Thread Nick Coghlan
On 19 Sep 2015 15:40, "Stephen J. Turnbull" wrote: > > Mark Lawrence writes: > > > I agree very strongly with your point here. Raising umpteen issues > > over installation failures when a full release comes out strikes me > > as below the belt when there have been multiple

Re: [Python-Dev] PEP 498 (interpolated f-string) tweak

2015-09-19 Thread Guido van Rossum
Good catch, Eric. For those who wonder what the difference is or why it matters, it's what we do for all dunder operators: the magic method is looked up on the class, not on the instance. This means you can't e.g. override + on a per-instance basis by having an instance variable named '__add__'