Author thejcannon
Recipients akira, barry, pitrou, r.david.murray, thejcannon
Date 2018-12-17.15:06:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545059165.15.0.788709270274.issue21041@psf.upfronthosting.co.za>
In-reply-to
Content
I created issue35498 about .parents rejecting slices as well. (It was pointed out this discussion would probably decide that issue's fate)
I think that .parents looking like a duck, but not quacking like one isn't very pythonic.

Besides, the fact that p.parents[len(p.parents)-2] is allowed but p.parents[-2] is not just seems like extra steps. There's also list(p.parents)[-2], which is still not ideal. In either case, I'd imagine authors to put a comment like "PathLib .parents doesn't support negative indexes", which goes to show clients are expecting negative indices to work.

I see that this issue is several years old. I'm happy to shepherd it if it needs further contributions.
History
Date User Action Args
2018-12-17 15:06:05thejcannonsetrecipients: + thejcannon, barry, pitrou, r.david.murray, akira
2018-12-17 15:06:05thejcannonsetmessageid: <1545059165.15.0.788709270274.issue21041@psf.upfronthosting.co.za>
2018-12-17 15:06:05thejcannonlinkissue21041 messages
2018-12-17 15:06:04thejcannoncreate