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 maxballenger
Recipients akira, barry, ju-sh, maxballenger, mdk, pitrou, r.david.murray, thejcannon, victorg
Date 2020-07-08.01:41:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Use case: I want to see if a Path is a descendent of /tmp.

if filepath.parents[-2] == Path('tmp'):

turns into

if filepath.parents[len(filepath.parents)-2] == Path('tmp'):
Date User Action Args
2020-07-08 01:41:55maxballengersetrecipients: + maxballenger, barry, pitrou, r.david.murray, akira, mdk, thejcannon, ju-sh, victorg
2020-07-08 01:41:55maxballengersetmessageid: <>
2020-07-08 01:41:55maxballengerlinkissue21041 messages
2020-07-08 01:41:55maxballengercreate