[Python-ideas] Working with Path objects: p-strings?
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Mar 25 17:59:41 EDT 2016
>>>On 24.03.2016 22:06, Koos Zevenhoven wrote:
>>>
>>>Or even better, that you could do p"filename.txt", which would give you a
>>>Path string object.
That would tie Path objects deeply into the parser and compiler,
which I'm not sure is a good idea.
Also, it would be stretching the string-prefix concept considerably.
Currently, the prefixes just represent different ways of specifying
a string -- the end result is still always an instance of str.
In this proposal, it would be a different type of object with
greatly different behaviour.
Not sure whether I feel positively or negatively about this,
so +0j.
--
Greg
More information about the Python-ideas
mailing list