<p dir="ltr">> In fact, it makes very logical sense once you explain it and makes people think of things more Pythonically after. I say from experience, not in theory.</p>
<p dir="ltr">Could you elaborate about "making people think more pythonically after" bit? I can see how explaining the API makes people understand the API, but I'm curious how it makes people behave differently after.<br>
</p>
<div class="gmail_quot<blockquote class=" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Aug 11, 2014 at 9:38 AM, Alexander Belopolsky <span dir="ltr"><<a href="mailto:alexander.belopolsky@gmail.com" target="_blank">alexander.belopolsky@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><br><div class="gmail_quote">On Mon, Aug 11, 2014 at 12:21 PM, Stephen Hansen <span dir="ltr"><<a href="mailto:me+python@ixokai.io" target="_blank">me+python@ixokai.io</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Don't name variables 'x' and 'y'. If it were as simple as "x.split(sep)" or "x.split('\t')" then I bet almost no one will need to consult the documentation to know which is which</blockquote>
</div><br></div>Sure, but on the same token if someone writes sep.split(x), how likely will this error be caught on a quick review? This is not theoretical. I've seen people make this mistake and asking for help in debugging rather non-obvious behaviors. </div>
</div></blockquote><div><br></div><div>I've seen people make innumerable mistakes in the past, I've seen certain classes of mistakes repeated -- this isn't an argument for change by itself. People make mistakes. Its going to happen.</div>
<div><br></div><div>That said, I find the idea that "x.split(sep)" as non-obvious to be... weird, to say the least. But, obvious is subjective. Your obvious may not be my obvious nor most people's obvious. </div>
<div><br></div><div>Yes, sep.join(list) is a bit of a weird construct, but its one thing to learn, and its not a hard one to teach at that. In fact, it makes very logical sense once you explain it and makes people think of things more Pythonically after. I say from experience, not in theory. But, string.split(sep) is very natural. You seem to think that they need to be in the same order to be obvious but I don't see why nor do I think any of the alternatives are not without problems that are bigger issues.</div>
</div></div><br></div>
<br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br></div>