Message207185
| Author |
july |
| Recipients |
july, pitrou |
| Date |
2014年01月02日.20:29:00 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1388694540.82.0.701601871731.issue20111@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
This is not a real-world example, but it brokes some invariant (part of path must not contain separator):
>>> pathlib.PurePath('/a/b.c.d').with_suffix('///')
PurePosixPath('/a/b.c///')
>>> pathlib.PurePath('/a/b.c.d').with_suffix('/not/split/into/parts').parts
('/', 'a', 'b.c/not/split/into/parts')
I think these cases should raise an error.
I would also like to consider the following to be an error, since the argument of with_suffix() is not exactly a suffix:
>>> PurePath('/a/b.c.d').with_suffix('e')
PurePosixPath('/a/b.ce')
but I'm far less sure in this case. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年01月02日 20:29:00 | july | set | recipients:
+ july, pitrou |
| 2014年01月02日 20:29:00 | july | set | messageid: <1388694540.82.0.701601871731.issue20111@psf.upfronthosting.co.za> |
| 2014年01月02日 20:29:00 | july | link | issue20111 messages |
| 2014年01月02日 20:29:00 | july | create |
|