<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sep 15, 2017 7:23 AM, "Jason H" <<a href="mailto:jhihn@gmx.com">jhihn@gmx.com</a>> wrote:<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Another pain point is python uses [].append() and JS uses [].join() Having a wrapper for append would be helpful.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">There should be one, and only one, obvious way to do it.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And for that matter, why isn't append/extend a global? I can add things to lots of different collections. lists, sets, strings...</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">This is a key misunderstanding. You CANNOT "append" to lots of collections.</div><div dir="auto"><br></div><div dir="auto">You can ADD to a set, which has a quite different semantics than appending (and hence a different name). You can neither add nor append to a string because they are immutable.</div><div dir="auto"><br></div><div dir="auto">I can imagine various collections where appending might make sense (mutable strings?). None of them are in builtins. If a 3rd party wrote such a collection with append semantics, they'd probably name it append... e.g. collections.deque has an "append" (but also an "appendleft").</div><div dir="auto"></div></div>