Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-30 Thread Philipp A.
Sorry, but I'm afraid you are projecting your thinking onto others. The syntactical constructs are called “string interpolations”, not “interpolated strings”. I.e. they're interpolations (a certain type of action) on strings. Strings are the objects, not the subjects. Strings are data, we have

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-30 Thread Guido van Rossum
Philipp, you need to stop debating this issue *now*. You need to write a PEP that can go into Python 3.7. Further debate at the current level (a hair-width close to name-calling) is not going to sway anyone. (This actually goes for Chris too -- nothing is obviously going to change Philipp's

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-30 Thread Philipp A.
Hi Guido, thanks for calling me out. Yikes, I'm terribly sorry that it came over that way! I'll write the RFC. Should I expand the existing one (this would need Chris’ pending changes though) or write a new one? My goals were to sound factual and terse, not to insult anyone. And I don't see the

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-30 Thread Guido van Rossum
Please just call it f-string and move on, we've had the naming debate previously, it's no longer productive. Regarding eventually supporting f'{'x'}', that will have to be a new PEP to extend PEP 498. (I previously thought it would be an incompatibility, but since f'{' is currently invalid, it's

Re: [Python-ideas] real numbers with SI scale factors

2016-08-30 Thread Guido van Rossum
On Tue, Aug 30, 2016 at 11:48 AM, Ken Kundert wrote: > [...] Similarly when people refer to the length of > the Olympic road race in Rio, they say 56km, not 56000m. However I can't help to point out that if I said the distance to the sun is 149.6 Gm, most people

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-30 Thread Barry Warsaw
On Aug 30, 2016, at 02:16 PM, Guido van Rossum wrote: >Given that something like this gets proposed from time to time, I >wonder if it would make sense to actually write up (1) and (2) as a >PEP that is immediately marked rejected. The PEP should make it clear >*why* it is rejected. This would be

Re: [Python-ideas] real numbers with SI scale factors: next steps

2016-08-30 Thread Ken Kundert
> What's the mnemonic here? Why "r" for scale factor? My thinking was that r stands for real like f stands for float. With the base 2 scale factors, b stands for binary. > (1) Why no support for choosing a particular scale? If this only auto-scales, > I'm not interested. Auto-scaling is kind

Re: [Python-ideas] Let’s make escaping in f-literals impossible

2016-08-30 Thread Chris Angelico
On Tue, Aug 30, 2016 at 10:56 PM, Philipp A. wrote: > My issue is just that it’s as much of a string as a call of a (string > returning) function/method or an expression concatenating strings: > > ''.join(things) # would you call this a string? > '{!r}'.format(x) # or

Re: [Python-ideas] real numbers with SI scale factors

2016-08-30 Thread Stephen J. Turnbull
Sven R. Kunze writes: > And now we have '_' in numbers. > > So much for "preferably one way". Poor example. There used to be no way to group long strings of numerals for better readability. Now there is exactly one way. The Zen is not an axe. It's a scalpel.

Re: [Python-ideas] Force UTF-8 option regardless locale

2016-08-30 Thread Victor Stinner
Le 30 août 2016 02:05, "INADA Naoki" a écrit : > How should the option be set? I propose to add a new -X utf8 option. Maybe if the use case is important, we might add an PYTHONUTF8 environment variable. The problem is that I'm not sure that an env var is the right way to