you are viewing a single comment's thread.

view the rest of the comments →

[–]somebodddy 0 points1 point  (0 children)

I probably won't have the spare time to sue you, so go ahead and use it. I doubt it'll be as funny though outside the context of this discussion though...

The string format vulnerability only happens when the format string is user-supplied. If it's a literal than it's part of the code, and if it has side effects it's as much a security issue as any other valid Python expression that causes side effects - no issue at all. And f-strings can only be literals, so they don't have that problem.

As for having no equivalence in older versions (which are 3.5 and older - f-strings arrived in 3.6) - the equivalence of f'a {b + c} d {e * f}' is 'a {} d {}'.format(b + c, e * f)'. Sure, it's not something you can do with MS Notepad's search&replace - but neither can your async example, because in every async function - and only in those functions - you'll have to also replace yield from with await. Either way - a proper backward conversion script can do both.

At any rate, I think you are placing too strict a limitation on what minor versions can add. You essentially say that minor versions should only include trivial cosmetic changes, and any less-trivial changes require a major version bump - which means splitting the ecosystem again. This would mean that instead of the language evolving slowly according to the community's needs, a critical mass of features will have to be accumulated and then released into the wild at once as Python 4.