os.path.join

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed May 2 02:10:06 EDT 2007


En Wed, 02 May 2007 02:31:43 -0300, <half.italian at gmail.com> escribió:

> A better question is why this doesn't work.
>
>>>> pathparts = ["/foo", "bar"]
>>>> os.path.join(pathparts)
> ['/foo', 'bar']
>
> This should return a string in my opinion.

I think it's a bug, but because it should raise TypeError instead.
The right usage is os.path.join(*pathparts)

-- 
Gabriel Genellina



More information about the Python-list mailing list