[issue28975] os.walk generator giving inconsistent results

2016-12-20 Thread Eric V. Smith
Changes by Eric V. Smith : -- stage: -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue28975] os.walk generator giving inconsistent results

2016-12-14 Thread Colin David Chen
Colin David Chen added the comment: Ah, you're correct. The behavior is consistent if you use strings in both invocations. The Path conversion strips the final '\\'. Doc examples do use the names of directories rather than a Path object. I will close the issue. Thanks for the quick response!

[issue28975] os.walk generator giving inconsistent results

2016-12-14 Thread Eric V. Smith
Eric V. Smith added the comment: Assuming Path is pathlib.Path, this is equivalent to the difference between: >>> list(os.walk('/tmp')) [('/tmp', and: >>> list(os.walk('/tmp/')) [('/tmp/', Because: >>> pathlib.Path('/tmp') PosixPath('/tmp') >>> pathlib.Path('/tmp/') PosixPath('/tmp') -

[issue28975] os.walk generator giving inconsistent results

2016-12-14 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't the difference that you use os.walk(Path(source)) in the first example, and os.walk(source) in the second one? -- nosy: +eric.smith ___ Python tracker ___

[issue28975] os.walk generator giving inconsistent results

2016-12-14 Thread Colin David Chen
Changes by Colin David Chen : -- title: os.walk generator vs -> os.walk generator giving inconsistent results ___ Python tracker ___ _