Re: Difference between os.path.isdir and Path.is_dir

2019-12-14 Thread Kirill Balunov
Yeah it is True, for the last two weeks or so I can access bugs.python.org in normal way. But I totally agree with the site that the best description of this situation is "Yet". with kind regards, -gdg сб, 14 дек. 2019 г. в 19:46, Terry Reedy : > On 7/26/2019 3:12 AM, Kirill Balunov wrote: > >

Re: Difference between os.path.isdir and Path.is_dir

2019-12-14 Thread Terry Reedy
On 7/26/2019 3:12 AM, Kirill Balunov wrote: чт, 25 июл. 2019 г. в 20:28, eryk sun : On 7/25/19, Kirill Balunov wrote: import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) False Path(dummy).is_dir() True I can't reproduce the above result in either

Re: Difference between os.path.isdir and Path.is_dir

2019-07-26 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 20:28, eryk sun : > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in either

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Cameron Simpson
On 26Jul2019 03:43, Chris Angelico wrote: On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: On 7/25/19, Kirill Balunov wrote: import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) > False Path(dummy).is_dir() > True I can't reproduce

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Cameron Simpson
On 25Jul2019 13:40, eryk sun wrote: Windows trims trailing spaces and dots from the final component of a path, unless we use a non-normalized \\?\ path. Hoo! Well, that explains some extremely weird NAS behaviour I encountered the other month with some paths ending in spaces. (My machine

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 6:13 AM Kirill Balunov wrote: > > > > чт, 25 июл. 2019 г. в 22:58, Chris Angelico : >> >> On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov >> wrote: >> [...] >> > No, it's not just because of curiosity. I will try to tell the background, >> > and maybe I went the wrong

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 22:58, Chris Angelico : > On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov > wrote: > [...] > > No, it's not just because of curiosity. I will try to tell the > background, and maybe I went the wrong way initially. There is a very cool > project https://github.com/3b1b/manim,

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 5:52 AM Kirill Balunov wrote: > > > > чт, 25 июл. 2019 г. в 19:16, Chris Angelico : >> >> On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov >> wrote: >> > >> > Hi all! It is expected that: >> > ``` >> > >>> import os >> > >>> from pathlib import Path >> > >>> dummy = " "

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 19:16, Chris Angelico : > On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov > wrote: > > > > Hi all! It is expected that: > > ``` > > >>> import os > > >>> from pathlib import Path > > >>> dummy = " " # or "" or " " > > >>> os.path.isdir(dummy) > > False > > >>>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Kirill Balunov
чт, 25 июл. 2019 г. в 20:28, eryk sun : > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in either

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Chris Angelico wrote: > On Fri, Jul 26, 2019 at 3:54 AM eryk sun wrote: > >> That's what I said. But the OP shows os.path.isdir(" ") == False and >> Path(" ").is_dir() == True, which is what I cannot reproduce and >> really should not be able to reproduce, unless there's a bug >>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 3:54 AM eryk sun wrote: > > On 7/25/19, Chris Angelico wrote: > > On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: > >> > >> On 7/25/19, Kirill Balunov wrote: > >> > > >> import os > >> from pathlib import Path > >> dummy = " " # or "" or " " > >>

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Chris Angelico wrote: > On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: >> >> On 7/25/19, Kirill Balunov wrote: >> > >> import os >> from pathlib import Path >> dummy = " " # or "" or " " >> os.path.isdir(dummy) >> > False >> Path(dummy).is_dir() >> >

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 3:28 AM eryk sun wrote: > > On 7/25/19, Kirill Balunov wrote: > > > import os > from pathlib import Path > dummy = " " # or "" or " " > os.path.isdir(dummy) > > False > Path(dummy).is_dir() > > True > > I can't reproduce the above result in

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread eryk sun
On 7/25/19, Kirill Balunov wrote: > import os from pathlib import Path dummy = " " # or "" or " " os.path.isdir(dummy) > False Path(dummy).is_dir() > True I can't reproduce the above result in either Linux or Windows. The results should only be different for an

Re: Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Chris Angelico
On Fri, Jul 26, 2019 at 1:30 AM Kirill Balunov wrote: > > Hi all! It is expected that: > ``` > >>> import os > >>> from pathlib import Path > >>> dummy = " " # or "" or " " > >>> os.path.isdir(dummy) > False > >>> Path(dummy).is_dir() > True > ``` > > or was it overlooked? > Was not aware