On Sun, 13 Feb 2022 at 15:43, Chris Angelico <ros...@gmail.com> wrote:
> > it to. If I'm on Windows and I tell something to write to a file in > > "%TEMP%\spam.csv", then I expect it to understand what that means. > > Cross-platform support is nice, but the most common need is for the > > current platform's normal behaviour. > That may or may not work as Windows has inconsistent treatment of multiple separators depending on where they appear in a path. If TEMP is a drive spec, say "t:\", then it expands to "t:\\spam.csv", which is an invalid windows path. If TEMP is a directory spec, "c:\temp\", then it expands to "c:\temp\\spam.csv", which works fine. C:\> dir c:\\temp\junk The filename, directory name, or volume label syntax is incorrect. C:\> dir c:\temp\\junk Volume in drive C has no label. Volume Serial Number is FC52-C692 Directory of c:\temp 2022-02-13 10:09 0 junk
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/C2MAD372Z5NOUG674P6DIOKGTUPWPLH3/ Code of Conduct: http://python.org/psf/codeofconduct/