▲ | unsnap_biceps 8 days ago | |
I totally agree with `Template.__str__()` == `Template.__repr__()`, but I would strongly be for adding a `Template.format()`. I expect that over time I'll be passed template strings where I expected normal strings and adding that example `f(template: Template)` everywhere to my code bases is just a lot of repeated code for no real value. That said, I think this is a great bit of work and I look forward to getting to use it! Thank you! | ||
▲ | zahlman 8 days ago | parent [-] | |
> and adding that example `f(template: Template)` everywhere to my code bases is just a lot of repeated code for no real value. I'd agree that it should be somewhere within the library, even if it's just a separate top-level function in the described `string.templatelib`. If it isn't, I'm sure someone will make a PyPI package for it right away. |