Message352331
Pretty much the same reason you would want to slice any other sequence. You want some range of values.
top_most_3_dirs = myPath.parents[-3:]
grandparents_and_beyond = myPath.parents[1:]
The same goes for negative indexes. |
|
Date |
User |
Action |
Args |
2019-09-13 13:43:13 | thejcannon | set | recipients:
+ thejcannon, brett.cannon, serhiy.storchaka, mdk |
2019-09-13 13:43:13 | thejcannon | set | messageid: <1568382193.3.0.814035018161.issue35498@roundup.psfhosted.org> |
2019-09-13 13:43:13 | thejcannon | link | issue35498 messages |
2019-09-13 13:43:13 | thejcannon | create | |
|