On 10Aug2019 1544, Glenn Linderman wrote:
On 8/10/2019 3:36 PM, Greg Ewing wrote:
It might be better to introduce a new string prefix, e.g.
'v' for 'verbatim':
v"C:\Users\Fred\"
Which is why I suggested rr"C:\directory\", but allowed as how there
might be better spellings.... I like your v for verbatim !
The only new prefix I would support is 'p' to construct a pathlib.Path
object directly from the string literal. But that doesn't change any of
the existing discussion (apart from please take all the new prefix
suggestions to python-ideas).
People have been solving the trailing backslash problem for a long time,
and it's not a big enough burden to need a new fix.
Unintentional escapes in paths are a much bigger burden for new users
and deserve a fix, but our current warning about the upcoming change is
not targeted at the right people. Because we intend to fix the warning,
delaying it by a release is not just "kicking the can down the road".
But we need some agreement on what that looks like.
The bug is already at https://bugs.python.org/issue32912
Cheers,
Steve
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/YVL3J7A4AM43NSUPUHMIMVZ7NT3WC2AZ/