[Python-ideas] The non-obvious nature of str.join (was Re: sum(...) limitation)

Alexander Belopolsky alexander.belopolsky at gmail.com
Mon Aug 11 18:38:10 CEST 2014


On Mon, Aug 11, 2014 at 12:21 PM, Stephen Hansen <me+python at ixokai.io>
wrote:

> 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


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140811/b0ee91dc/attachment.html>


More information about the Python-ideas mailing list