Message386904
While using pathlib I realised there are situations where I easily want to check if part of a returned path object contains a particular given path (as a string).
Today the following will give an error:
...
path = PosixPath('/usr/share/doc/')
if 'share' in path:
....print('Do something')
The patch will make the example above work and will open up for a simple shortcut.
This is my first attempt to contribute, all opinions are very welcome.
I have also pushed the commit to my own branch https://github.com/tomplast/cpython/tree/implement-path-contains. |
|
Date |
User |
Action |
Args |
2021-02-13 04:44:50 | tomplast | set | recipients:
+ tomplast |
2021-02-13 04:44:50 | tomplast | set | messageid: <1613191490.46.0.373267052174.issue43213@roundup.psfhosted.org> |
2021-02-13 04:44:50 | tomplast | link | issue43213 messages |
2021-02-13 04:44:50 | tomplast | create | |
|