Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Eric V. Smith
On 5/7/19 8:39 PM, Steven D'Aprano wrote: Disclaimer: this topic seems to have been split over at least two issues on the bug tracker, a Python-Ideas thread from 2018, Discourse (I think...) and who knows what else. I haven't read it all, so excuse me if I'm raising something already discussed.

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Steven D'Aprano
Disclaimer: this topic seems to have been split over at least two issues on the bug tracker, a Python-Ideas thread from 2018, Discourse (I think...) and who knows what else. I haven't read it all, so excuse me if I'm raising something already discussed. On Mon, May 06, 2019 at 08:39:41PM -0400,

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Eric V. Smith
Hi, Tim. Your name came up frequently as a target for this use case. I think we’ve come up with a pretty good solution. Now if I could only convince my clients to upgrade from 2.7! I’ve heard about these f-string things, and I think I would enjoy using them. Eric > On May 7, 2019, at 12:50

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Tim Peters
[Larry Hastings ] > Guido just stopped by--we're all at the PyCon 2019 dev sprints--and we had > a chat about it. Guido likes it but wanted us to restore a little of the > magical > behavior we had in "!d": now, = in f-strings will default to repr (!r), unless > you specify a format spec. If you

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Eric V. Smith
On 5/7/19 9:49 AM, Barry Warsaw wrote: On May 7, 2019, at 03:52, Steve Holden wrote: What's not to like? My only complaint is that you steadfastly refuse use Guido’s time machine keys to make this available in 3.7. Open a feature request here: https://github.com/asottile/future-fstrings

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Skip Montanaro
> My only complaint is that you steadfastly refuse use Guido’s time machine > keys to make this available in 3.7. Wait a minute, Barry. You mean you don't already have an Emacs function to do the rewriting as a pre-save-hook? Skip ___ Python-Dev mailin

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Larry Hastings
Guido just stopped by--we're all at the PyCon 2019 dev sprints--and we had a chat about it.  Guido likes it but wanted us to restore a little of the magical behavior we had in "!d": now, = in f-strings will default to repr (!r), /unless/ you specify a format spec. If you specify a format spec

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Barry Warsaw
On May 7, 2019, at 03:52, Steve Holden wrote: > > What's not to like? My only complaint is that you steadfastly refuse use Guido’s time machine keys to make this available in 3.7. -Barry signature.asc Description: Message signed with OpenPGP ___ P

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Paul Moore
On Tue, 7 May 2019 at 01:43, Eric V. Smith wrote: > After that lightning talk, Larry and I talked about it some more, and > for a number of reasons decided that it would make more sense if the > syntax used an = sign. So we came up with f"{foo=}", which would also > produce "foo='Hello'". Works f

Re: [Python-Dev] Easier debugging with f-strings

2019-05-07 Thread Steve Holden
What's not to like? On Tue, May 7, 2019 at 2:31 AM Glenn Linderman wrote: > On 5/6/2019 5:39 PM, Eric V. Smith wrote: > > Last fall Larry Hastings made a suggestion for adding a way to make > so-called "print-based debugging" easier with f-strings. Basically the > approach is that f-strings wou

Re: [Python-Dev] Easier debugging with f-strings

2019-05-06 Thread Glenn Linderman
On 5/6/2019 5:39 PM, Eric V. Smith wrote: Last fall Larry Hastings made a suggestion for adding a way to make so-called "print-based debugging" easier with f-strings. Basically the approach is that f-strings would be able to produce the text of the expression and the value of that expression, w

[Python-Dev] Easier debugging with f-strings

2019-05-06 Thread Eric V. Smith
Last fall Larry Hastings made a suggestion for adding a way to make so-called "print-based debugging" easier with f-strings. Basically the approach is that f-strings would be able to produce the text of the expression and the value of that expression, without repeating the expression in the f-s