[Python-ideas] Working with Path objects: p-strings?
Paul Moore
p.f.moore at gmail.com
Tue Mar 29 03:49:00 EDT 2016
On 29 March 2016 at 08:22, Sven R. Kunze <srkunze at mail.de> wrote:
> Thinking more about it, that would even come in nicely with path separators:
>
> p'/{whereever}/{youwant}/{togo}'
>
> That'll finally an easy-to-write and readable path generation. Great idea,
> Stephen.
P(wherever)/youwant/togo
is as good, if not better - just "from pathlib import Path as P" (or
use Path(wherever) if you don't like unnecessary 1-letter aliases...)
Paul
More information about the Python-ideas
mailing list