Author mdk
Recipients akira, barry, mdk, pitrou, r.david.murray, thejcannon
Date 2019-09-13.10:30:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568370640.98.0.798830331069.issue21041@roundup.psfhosted.org>
In-reply-to
Content
I checked conversation in #7951, tells about an ambiguity because it could be an index from a sequence or a key for a dict, like {-1: "foo"}.

Here there is no such confusion.

Confusion *may* arrise from the fact that it's not composed of parts, but more like it's already sliced, I mean it does NOT look like:

   ['/', 'home', 'mdk', 'clones', 'python']

It's more like:

   ['/home/mdk/clones/python', '/home/mdk/clones', '/home/mdk', '/home', '/']


In fact I'd say it behave more like a function call than a sequence access, I read:

   pathlib.Path.cwd().parents[1]

a bit like:

   pathlib.Path.cwd().parents(go_down=1)

It may explain why negative indices or slices were initially not implemented: It already looks like the result of a slice.
History
Date User Action Args
2019-09-13 10:30:41mdksetrecipients: + mdk, barry, pitrou, r.david.murray, akira, thejcannon
2019-09-13 10:30:40mdksetmessageid: <1568370640.98.0.798830331069.issue21041@roundup.psfhosted.org>
2019-09-13 10:30:40mdklinkissue21041 messages
2019-09-13 10:30:40mdkcreate