It looks like you're suggesting hard-coding specific language escape
conventions into f-strings?
What if instead you were to allow delegation to some filter function?
Then, it's generic and extensible.
def html(value: Any):
filtered = ... # filter here
return filtered
f'{!!html}...'
P
On Sun, 27 Jun 2021 at 08:11, Paul Bryan wrote:
>
> It looks like you're suggesting hard-coding specific language escape
> conventions into f-strings?
That's how I understood the proposal too. Hard coding specific
conventions shouldn't be part of a language construct IMO.
> What if instead you
[this is a continuation of https://bugs.python.org/issue44452]
pathlib.Path() has a concatenation operator "/" that allows the
right-hand-side argument to be an absolute path, which causes the
left-hand-side argument to be ignored:
>>> pathlib.Path('/foo') / '/bar'
PosixPath('/bar')
>>> pathlib.P
> On 27 Jun 2021, at 12:07, Zbigniew Jędrzejewski-Szmek
> wrote:
>
> [this is a continuation of https://bugs.python.org/issue44452]
>
> pathlib.Path() has a concatenation operator "/" that allows the
> right-hand-side argument to be an absolute path, which causes the
> left-hand-side argument
Thanks for the comments, Paul and Paul.
On Sun, Jun 27, 2021 at 1:14 AM Paul Moore wrote:
> On Sun, 27 Jun 2021 at 08:11, Paul Bryan wrote:
> >
> > It looks like you're suggesting hard-coding specific language escape
> conventions into f-strings?
>
> That's how I understood the proposal too. Ha
"[Python-ideas] Sanitize filename (path part) 2nd try"
https://mail.python.org/archives/list/[email protected]/thread/LRIKMG3G4I4YQNK6BTU7MICHT7X67MEF/
"[Python-ideas] Sanitize filename (path part)"
https://mail.python.org/archives/list/[email protected]/thread/SQH4LPERFLKBLXPDUOVJMV24