4 ms·
os.path.join is evil. Don't use it. Yes, I recently learned this myself (luckily not the hard way).
by bcl 16y ago
os.path.join is evil. Don't use it. Yes, I recently learned this myself (luckily not the hard way).
- deleted 16y ago[deleted]
- TomasSedovic 16y agoWell, that's a pretty broad statement. Do you mean that it's evil when called with untrusted input by a trusting program or evil in general and not to be used under any or most circumstances? The article suggests the former but your comment the latter. I would think the function is pretty safe and okay when you use it with a known input. Better than writing your own, anyway.
- bcl 16y agoEvil with un-trusted input. And dangerous when you forget that passing it a new root will wipe the previous paths.