2 funny Py2.3 Issues: 'datetime', string.join()

John Roth newsgroups at jhrothjr.com
Tue Aug 19 20:51:04 EDT 2003


"Andrew Dalke" <adalke at mindspring.com> wrote in message
news:xey0b.269$Ej6.152 at newsread4.news.pas.earthlink.net...
> Rami A. Kishek:
> > string.  However, wouldn't it make more sense if the "join" mehtod
> > actually belonged to the List object, since it primarily operates on
> > lists?
>
> http://www.python.org/cgi-bin/faqw.py?req=show&file=faq04.096.htp

While the FAQ does a good job, the arguement I prefer is that making
.join a method on sequences rather than strings only works when the members
of the sequence are all strings.  What does, for example,
[1, 3, 6].join(',') mean?

John Roth






More information about the Python-list mailing list