Author The Compiler
Recipients The Compiler, serhiy.storchaka
Date 2015-03-26.08:02:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:03The Compilersetrecipients: + The Compiler, serhiy.storchaka
2015-03-26 08:02:03The Compilersetmessageid: <>
2015-03-26 08:02:03The Compilerlinkissue23780 messages
2015-03-26 08:02:02The Compilercreate