ucodery / fyeah

Other
23 stars 3 forks source link

Adding lazy evaluation option #11

Open andrastantos opened 4 months ago

andrastantos commented 4 months ago

Hello!

I needed a way to lazy-evaluate f-strings and I have found your library to be an excellent starting point. However, I needed to add a small modification (retaining of the calling scope) to make this feature functional.

In this commit you'll find a new version of 'f', 'lazy_f', which performs this lazy evaluation.

Thanks again for the great work! Andras

ucodery commented 2 weeks ago

An interesting idea. I am still considering the implications, but noting here for you and future me that this would mirror the not-as-of-now-added fl string in CPython https://github.com/python/cpython/issues/77135