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 thejcannon
Recipients thejcannon
Date 2018-12-14.16:55:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I would expect the following to work:
>>> import pathlib
>>> pathlib.Path.cwd().parents[0:1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "...\Python36\lib\", line 593, in __getitem__
    if idx < 0 or idx >= len(self):
TypeError: '<' not supported between instances of 'slice' and 'int'

Since pathlib documents `parents` as a sequence-type, and slicing a sequence is pretty standard behavior.
Date User Action Args
2018-12-14 16:55:17thejcannonsetrecipients: + thejcannon
2018-12-14 16:55:17thejcannonsetmessageid: <>
2018-12-14 16:55:17thejcannonlinkissue35498 messages
2018-12-14 16:55:17thejcannoncreate