On Sun, Feb 12, 2017 at 3:20 PM, eryk sun <eryk...@gmail.com> wrote:
> On Sun, Feb 12, 2017 at 3:52 AM, Steve D'Aprano
> <steve+pyt...@pearwood.info> wrote:
>> In Python, you should always use forward slashes for paths, even on Windows.
>
> There are cases where slash doesn't work (e.g. some command lines;
> \\?\ prefixed paths; registry subkey paths), so it's simpler to follow
> a rule to always convert paths to backslash on Windows, using
> os.path.normpath or pathlib.Path.

Registry subkeys aren't paths, and the other two cases are extremely
narrow. Convert slashes to backslashes ONLY in the cases where you
actually need to.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to