Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue19775

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Provide samefile() on Path objects
Type:enhancementStage:resolved
Components:Library (Lib)Versions:Python 3.5
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: Arfrever, gvanrossum, pitrou, python-dev, vajrasky, vstinner
Priority:normalKeywords:patch

Created on2013-11-25 19:48 bypitrou, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
pathlib_samefile.patchvajrasky,2013-12-01 05:00review
pathlib_samefile_v2.patchvajrasky,2013-12-01 14:31review
pathlib_samefile_v3.patchvajrasky,2013-12-05 03:07review
Messages (9)
msg204386 -(view)Author: Antoine Pitrou (pitrou)*(Python committer)Date: 2013-11-25 19:48
It would probably be useful to provide samefile() on Path objects - basically doing the same thing as os.path.samefile().
msg204639 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2013-11-28 01:54
I like the idea :-)
msg204880 -(view)Author: Vajrasky Kok (vajrasky)*Date: 2013-12-01 05:00
Here is the patch.
msg204887 -(view)Author: Arfrever Frehtes Taifersar Arahesis (Arfrever)*(Python triager)Date: 2013-12-01 07:51
About doc string in patch:1. s/same/the same/2. "same" is usually used with "as", not "with":https://books.google.com/ngrams/graph?content=same+as%2Csame+with%2Csame+to&year_start=1800&year_end=2000&corpus=15&smoothing=3
msg204923 -(view)Author: Vajrasky Kok (vajrasky)*Date: 2013-12-01 14:31
Updated grammar according to Arfrever's review. Thanks!Anyway, should samefile accepts only string? Or should it accept Path object as well?
msg205263 -(view)Author: Antoine Pitrou (pitrou)*(Python committer)Date: 2013-12-04 23:30
Thanks for the patch! Some comments:1. It should path objects as well as str objects.2. I don't think you have to call resolve() here.3. you should probably test what happens when one of the files doesn't exist4. you need to update the documentation too
msg205270 -(view)Author: Vajrasky Kok (vajrasky)*Date: 2013-12-05 03:03
Thanks for the review!Attached the patch addressing the request by Antoine.
msg218413 -(view)Author: Antoine Pitrou (pitrou)*(Python committer)Date: 2014-05-13 08:40
Sorry, it seems I have let this issue slip. I will update the patch and commit it soon!
msg218415 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2014-05-13 08:50
New changeset197ac5d79456 by Antoine Pitrou in branch 'default':Issue#19775: Add a samefile() method to pathlib Path objects.http://hg.python.org/cpython/rev/197ac5d79456
History
DateUserActionArgs
2022-04-11 14:57:54adminsetgithub: 63974
2014-05-13 08:55:56pitrousetstatus: open -> closed
resolution: fixed
stage: resolved
2014-05-13 08:50:39python-devsetnosy: +python-dev
messages: +msg218415
2014-05-13 08:40:34pitrousetmessages: +msg218413
2013-12-05 03:07:34vajraskysetfiles: +pathlib_samefile_v3.patch
2013-12-05 03:07:28vajraskysetfiles: -pathlib_samefile_v3.patch
2013-12-05 03:05:43vajraskysetfiles: +pathlib_samefile_v3.patch
2013-12-05 03:05:23vajraskysetfiles: -pathlib_samefile_v3.patch
2013-12-05 03:03:17vajraskysetfiles: +pathlib_samefile_v3.patch

messages: +msg205270
2013-12-04 23:30:27pitrousetmessages: +msg205263
2013-12-01 14:31:55vajraskysetfiles: +pathlib_samefile_v2.patch

messages: +msg204923
2013-12-01 07:51:11Arfreversetmessages: +msg204887
2013-12-01 05:00:55vajraskysetfiles: +pathlib_samefile.patch

nosy: +vajrasky
messages: +msg204880

keywords: +patch
2013-11-28 01:54:05vstinnersetnosy: +gvanrossum,vstinner
messages: +msg204639
2013-11-26 02:29:10Arfreversetnosy: +Arfrever
2013-11-25 19:48:21pitroucreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp