[issue44452] Allow paths to be joined without worrying about a leading slash

2021-11-26 Thread lutecki


lutecki  added the comment:

So how this should work? 
I'm testing this simple example on Windows:

a = Path("/a/b")
b = Path("c/d")

and b / a gives me WindowsPath('/a/b'). So I'm like "ok, a seems like absolute, 
I will test for that" but on Windows a.is_absolute() is False.
???

Regards

--
nosy: +lutecki

___
Python tracker 
<https://bugs.python.org/issue44452>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38793] pathlib.Path.resolve(strict=False) strips final path components

2019-11-14 Thread lutecki


New submission from lutecki :

When a directory doesn't exist, the resolve() method trims everything except 
the first component (a doesn't exist here):

import pathlib
p = pathlib.Path(".", "a", "b", "c")
p
WindowsPath('a/b/c')
p.resolve(strict=False)
WindowsPath('C:/Python36/Scripts/a')

I would expect C:/Python36/Scripts/a/b/c
Am I missing something?

--
components: Windows
messages: 356589
nosy: lutecki, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: pathlib.Path.resolve(strict=False) strips final path components
type: behavior
versions: Python 3.6

___
Python tracker 
<https://bugs.python.org/issue38793>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com