On 07/09/2016 23:41, Matt Gilson wrote:
I lurk around here a lot more than I actually post
Very wise. I am a tournament Bridge player, and one of the things I say
to my partners is: "Bidding is very simple. When you have something to
say, say it (unless it really seems too dangerous). When you have
nothing to say, Pass".
-- But in this case I find myself weighing in firmly on the side of
"please don't add this". It'd just add noise in the documentation and
__builtins__ namespace. There are millions of useful functions that
/could/ be added to the `list` object (or to the `__builtins__`
namespace). It's the job of the core dev team to decide which are the
most useful for everybody and this is one where (in my opinion) the
usefulness doesn't justify the additional clutter.
It seems like the primary argument for this is that some users would
like to have this functionality baked into an interactive session. If
that's the case, then I'd like to point out that if you find yourself
wanting this in an interactive session frequently there is an
interactive startup file
<https://docs.python.org/3/tutorial/appendix.html#the-interactive-startup-file>
that you can modify so that this function will always be available to
/you/ whenever you start up an interactive session (and you can put
whatever else in there that you like as well :-).
I hope that helps.
+1
And incidentally, thank you for reminding me of this. I do actually use
|PYTHONSTARTUP| (mostly to pre-import modules that I use frequently:
sys, time, datetime, os, etc. - YMMV). But your reminder may well prod
me into finding new uses.
Rob Cliffe
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/