[Python-ideas] Working with Path objects: p-strings?
Eric V. Smith
eric at trueblade.com
Tue Mar 29 08:24:13 EDT 2016
On 3/26/2016 7:13 PM, Greg Ewing wrote:
> Path objects, on the other hand, come with a pile of
> semantics relating to a particular application area --
> manipulation of the file system. Moreover, those
> semantics vary depending on what operating system you're
> running on. So it's hard so see them as being part of
> the language the way str and bytes are.
>
> This feels like a slippery slope to me. If we include
> special syntax for pathnames, why shouldn't we have it
> for dates and times? Regular expressions? URLs? JSON
> data? SQL queries? XML data? Where do we draw the line?
PEP 501 tries to address these issues, with i-strings. There were other
proposals on python-ideas relating to arbitrary string prefixes when
PEPs 498 and 501 were being discussed.
Eric.
More information about the Python-ideas
mailing list