You should check out PEP 787
Hmm, PEP-787 has some interesting discussions around it. I'll have to sort my thoughts on these aspects a bit.
Re:Python's new t-strings
by pauleveritt on Monday April 21, 2025 @02:46PM
(#43755129)
We really should just point most of these comments at that PEP. Thanks for getting it out so fast.
Oh! I missed this one because I've been looking specifically at the Packaging forum rather than the PEPs forum. This looks like a brilliant use case. (I'm aiming for wide compatibility - back to 3.6 - with my current projects, but I look forward to trying this out if and when it's accepted and implemented.)
Now if only the overall `subprocess` interface weren't so complex....
PEP 787 – Safer subprocess usage using t-strings https://peps.python.org/pep-0787/
Re:Python's new t-strings
by dhruvrajvanshi on Monday April 21, 2025 @04:34PM
(#43756169)
Not Python but this is exactly the idea behind zx
I'd have to take a look at the order things happen in shell, but you might even be able to increase security/foot-gun-potential a little bit here by turning this into something like `stat "$( base64 -d [base64 encoded content of some_file] )"`.