This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akira
Recipients akira
Date 2014-03-23.22:16:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
`pathlib.PurePath.parents` is a sequence [1] but it rejects negative indexes:

  >>> from pathlib import PurePath
  >>> PurePath('a/b/c').parents[-2]
  Traceback (most recent call last):
  IndexError: -2

Sequences in Python interpret negative indexes as `len(seq) + i` [2]

I've included the patch that fixes the issue and adds corresponding tests. No documentation changes are needed.

Date User Action Args
2014-03-23 22:16:51akirasetrecipients: + akira
2014-03-23 22:16:51akirasetmessageid: <>
2014-03-23 22:16:51akiralinkissue21041 messages
2014-03-23 22:16:50akiracreate