[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2019-12-17 Thread Mateusz Bysiek
Change by Mateusz Bysiek : -- nosy: +mbdevpl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: Sorry about that! I'll be sure to refresh next time before posting a reply. -- ___ Python tracker

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Eric V. Smith
Eric V. Smith added the comment: Arcadiy: Somehow you're dropping Serhiy and me from the nosy list. I've re-added us. -- nosy: +eric.smith, serhiy.storchaka ___ Python tracker

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: > Although general-purpose mechanism that would allow pluggable constructs like > `sh`, `html`, `sql` Strike that one, I didn't read into PEP-0501 deep enough before replying. Yes, `i"format"` is what I'm talking about. --

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: @eric.smith Thanks! I was looking for such a general-purpose proposal but could not find it. Although general-purpose mechanism that would allow pluggable constructs like `sh`, `html`, `sql` and the like is awesome and very desirable

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: @serhiy.storchaka Of course a similar pattern can be implemented via a class (or even without one as I've shown below). But you can clearly notice that in your example: 1) There are tons of boilerplate (as in mine with lambdas). 2) It's

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Eric V. Smith
Eric V. Smith added the comment: See also PEP 501. -- nosy: +eric.smith, serhiy.storchaka ___ Python tracker ___

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Arcadiy Ivanov
Arcadiy Ivanov added the comment: As an example this is the current state of affairs: >>> def x(): ... foo = "foo" ... s1 = f"S1 value {foo}" ... s2 = f"S2 value {s1}" ... print(s2) ... >>> dis.dis(x) 2 0 LOAD_CONST 1 ('foo')

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: class FL: def __init__(self, func): self.func = func def __str__(self): return self.func() extra = FL(lambda: f'{extra},waiters:{len(self._waiters)}') -- nosy: +serhiy.storchaka

[issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings)

2018-02-26 Thread Arcadiy Ivanov
New submission from Arcadiy Ivanov : I'd like to start a discussion on/gauge interest for introducing an enhancement to PEP-498 in a form of delayed/lazy/lambda f-string. The proposed change is, conceptually, minor and would not differ from PEP-498 syntactically at all