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 <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za>
In-reply-to
Content
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\pathlib.py", 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.
History
Date User Action Args
2018-12-14 16:55:17thejcannonsetrecipients: + thejcannon
2018-12-14 16:55:17thejcannonsetmessageid: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za>
2018-12-14 16:55:17thejcannonlinkissue35498 messages
2018-12-14 16:55:17thejcannoncreate