Roffild <roff...@gmail.com> added the comment:

It is necessary to assemble a single path from several lines depending on the 
OS.

It is logical to expect behavior in Java.
https://docs.oracle.com/javase/8/docs/api/java/nio/file/Paths.html
Converts a path string, or a sequence of strings that when joined form a path 
string, to a Path. If more does not specify any elements then the value of the 
first parameter is the path string to convert. If more specifies one or more 
elements then each non-empty string, including first, is considered to be a 
sequence of name elements (see Path) and is joined to form a path string. The 
details as to how the Strings are joined is provider specific but typically 
they will be joined using the name-separator as the separator. For example, if 
the name separator is "/" and getPath("/foo","bar","gus") is invoked, then the 
path string "/foo/bar/gus" is converted to a Path. A Path representing an empty 
path is returned if first is the empty string and more does not contain any 
non-empty strings.

My temporary fix is something like this:
print("\\".join(["C:/123\\345", "\\", "folder///filename.bin"]).replace("/", 
"\\").replace("\\\\", "\\").replace("\\\\", "\\"))

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35223>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to