[Python-ideas] Working with Path objects: p-strings?

Sven R. Kunze srkunze at mail.de
Tue Mar 29 03:22:44 EDT 2016


On 29.03.2016 09:11, Sven R. Kunze wrote:
> On 26.03.2016 19:17, Koos Zevenhoven wrote:
>> On Sat, Mar 26, 2016 at 7:32 PM, Stephen J. Turnbull 
>> <stephen at xemacs.org> wrote:
>>
>>     Koos Zevenhoven writes:
>>
>>
>>     How about generalizing f-strings, or perhaps giving p-strings (some
>>     of) the power of f-strings?
>>
>>
>
> That'll be a good idea.
>
>> Just their combination: pf"{ path_as_string }" ? That would at least 
>> be very consistent.
>
> Could be make implicit: p'{my_variable}'

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.


Best,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160329/4f6a90d8/attachment-0001.html>


More information about the Python-ideas mailing list