I wonder how that is substantially different than:

from pathlib import Path as p
p() / "foo"

or perhaps more verbosely, but arguably more readable:

from pathlib import Path
Path() / "foo"

Paul


On Tue, 2021-02-16 at 01:07 +0000, mwmajewsk wrote:
P.S. the code snippet I mentioned is not rendering with mailman archives, here it is again;

from pathlib import path_literal as p
p/"foo"

the result is:
PosixPath('foo')
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/ARV4RO2YVDWGT4JQLPYJIIDYCYILLKQY/
Code of Conduct: http://python.org/psf/codeofconduct/