[Python-ideas] The non-obvious nature of str.join (was Re: sum(...) limitation)
Todd
toddrjen at gmail.com
Mon Aug 11 17:55:25 CEST 2014
On Mon, Aug 11, 2014 at 3:56 PM, Alexander Belopolsky <
alexander.belopolsky at gmail.com> wrote:
>
> On Mon, Aug 11, 2014 at 2:56 AM, Wolfgang Maier <
> wolfgang.maier at biologie.uni-freiburg.de> wrote:
>
>> I am using Python for teaching programming to absolute beginners at
>> university and, in my experience, joiner.join is never a big hurdle.
>
>
> In my experience, it is the asymmetry between x.join(y) and x.split(y)
> which causes most of the confusion. In x.join(y), x is the separator and y
> is the data being joined, but in x.split(y), it is the other way around.
>
What would be the solution to this? Making join a list method, or
reversing the behavior of split which means it no longer acts on x?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140811/9d491a4f/attachment-0001.html>
More information about the Python-ideas
mailing list