<br><div class="gmail_quote">On Sun, Mar 6, 2011 at 7:27 PM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org">guido@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Well, I'm sorry, but this is not going to change ... The cost of change is just too high,<br>
so we'll just have to live with the current behavior (and we might as<br>
well accept that it's solid instead of trying to fight it).<br>
<div><div class="h5"><br></div></div></blockquote><div><br></div><div>Completely agree.</div><div><br></div><div>It's interesting that the one thing that annoys me about string.split hasn't been mentioned here. I'm not bothered by the inconsistency in handling of the degenerate cases because frequently I need code to handle the degenerate case specially anyway.</div>

<div><br></div><div>What *does* annoy me is the inconsistency of what the count parameter means between different languages. That is str.split(delimiter, count) means different things in different languages: </div><div><br>

</div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div class="gmail_quote"><div><div>Python/Javascript = max number of splits</div></div></div><div class="gmail_quote">

<div><div>Java/C#/Ruby = max number of results</div></div></div></blockquote><div class="gmail_quote"><div><br></div><div>Obviously, it would break things badly to switch from one to the other (in any language). An alternative would be first changing to:</div>

<div><br></div><div>    str.split(sep, maxsplits=None)</div><div><br></div><div>and modify pylint to complain if maxsplits is used as a non-keyword argument. Eventually, change to</div><div><br></div><div><div>    str.split(sep, deprecated=None, maxsplits=None)</div>

</div><div><br></div><div>where this throws an exception if deprecated is not None. This would also open up having maxresults keyword if it's desirable to allow either variant.</div><div><br></div><div>--- Bruce</div>

<div><br></div></div>