[Python-ideas] The non-obvious nature of str.join (was Re: sum(...) limitation)
Alexander Heger
python at 2sn.net
Tue Aug 12 00:56:27 CEST 2014
> You are kidding, right? What will prevent them from using logic to recall
> the invariant mistakenly as
> s == sep.join(sep.split(s)) ? If only because there are natural use cases
> for passing mysep.join around as a callable that will join with a fixed
> separator, and there would similarly exist use cases for mysep.split, while
> there are really none for passing around mystring.split to split a fixed
> string by varying separators.
>
> This whole corner of python is a most ugly system of inconsistent acne scars
> in the 2.x series (dunno about 3.x). What with sum(...) pedantically telling
> you to use str.join - if it knows what you want, it should just to it.
I tend to agree...
More information about the Python-ideas
mailing list