Message239314
I just accidentally passed a list (instead of unpacking it) to os.path.join. I was surprised when it just returned the list unmodified:
>>> os.path.join([1, 2, 3])
[1, 2, 3]
Looking at the source, it simply returns the first argument (path = a; ...; return path) when the '*p' part is empty.
I think a "genericpath._check_arg_types('join', a)" or similiar should be added at the top, or it should ensure the "*p" part is not empty (as the docstring says "two or more pathname components"). |
|
Date |
User |
Action |
Args |
2015-03-26 08:02:03 | The Compiler | set | recipients:
+ The Compiler, serhiy.storchaka |
2015-03-26 08:02:03 | The Compiler | set | messageid: <1427356923.25.0.682691905774.issue23780@psf.upfronthosting.co.za> |
2015-03-26 08:02:03 | The Compiler | link | issue23780 messages |
2015-03-26 08:02:02 | The Compiler | create | |
|