[Python-ideas] Re: Make list.reverse() more flexible
Indeed, I understand. Thanks for reply. ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7BV6V22RXD4HPAJAHQWDKWVGWJHUZMRJ/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-ideas] Re: Make list.reverse() more flexible
On Sat, 6 Mar 2021 at 10:42, Vincent Cheong wrote: > > I see. > > You have coined the term exactly, partial-reverse. Nice. You have also put > forward a realistic question of 'why do we need'. Well, surely not everyone > needs it and definitely it's not urgently needed, but its just the > counterintuitive incompleteness such that 'it works for a whole, but not part > of it', you see. About the gain, of course it's unlike a monumental speed > boost, but its just a little spot that I saw lacking in power. > > What I had in mind was the algorithmic cost to the program itself, not the > cost in developing it. But now that you explained to me, I understand the > situation. > > Thanks for the information. To put this in context, I think that if you were to create a PR for Python, implementing this change, and post it as a feature request to bugs.python.org, it may well be accepted without (much) debate. It's a classic case of "actions speak louder than words", basically - it's fairly easy for a core dev to look at a PR, think "yes, this is a simple and logical enhancement" and focus on tidying up any technical details before simply merging it. Whereas coming to a discussion forum like this one, and opening with (in effect) "it would be nice if someone did X" tends to get everyone thinking about what it would need to persuade them to spend time writing that code, what they'd think about when writing it, etc, etc. And what you get is a long discussion, but little actual action. Paul ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/C3FOC2R2TMKOVCHWPQZ6XANCVUXM2L4Z/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-ideas] Re: Make list.reverse() more flexible
I see. You have coined the term exactly, partial-reverse. Nice. You have also put forward a realistic question of 'why do we need'. Well, surely not everyone needs it and definitely it's not urgently needed, but its just the counterintuitive incompleteness such that 'it works for a whole, but not part of it', you see. About the gain, of course it's unlike a monumental speed boost, but its just a little spot that I saw lacking in power. What I had in mind was the algorithmic cost to the program itself, not the cost in developing it. But now that you explained to me, I understand the situation. Thanks for the information. ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/XEVRJMJ7V7MMGIJGH6LKGFZ77DKI2HBI/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-ideas] Re: Make list.reverse() more flexible
On Sat, 6 Mar 2021 at 07:52, Vincent Cheong wrote: > > So I thought, 'Why do we need to make a reversed copy to assign it to the > original part, when we can simply reverse the original part itself.' That's > the paradigm. A few points strike me here: 1. The question you asked ("why do we need to") has an obvious and trivial answer. "We don't need to". But so what? It's what we have, and the status quo tends to win. If you're arguing for change, you need to argue that the *cost* of that change is worth it, so you need to be looking at what we will *gain*. 2. To put this another way, as far as this list is concerned, you're phrasing the question backwards. Because backward compatibility and availability of people for implementation and maintenance are real costs for any proposal, the question that matters *here* is "Why do we need partial-reverse to be a built in operation?" 3. If you're interested in the idea, you can, of course, implement it and see how it works out. No-one is stopping you writing either an extension that implements this, or a patch to Python. That's basically the *whole point* of open source :-) And then, coming to this list saying "I made this patch that implements in-place partial reversal of lists, would it be worth submitting it as a PR?" would be a much easier place to start from (because you're offering something that's already eliminated some of those costs, as well as demonstrating that you've looked at the practical aspects of the proposal). Basically, even though this list is about "ideas", purely theoretical "wouldn't it be nice if..." discussions don't tend to get very far (or if they do, it's "far" in the sense of "way off-topic" :-)). A little bit of work or thinking on the practical aspects of a proposal tends to help a lot. Paul ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/7IWYFS2LVP5NAPSXW6UGQ4Z4DF5T23UL/ Code of Conduct: http://python.org/psf/codeofconduct/
[Python-ideas] Re: Make list.reverse() more flexible
On Sat, Mar 06, 2021 at 07:46:18AM +, David Mertz wrote: > So this "research" is inherently doomed to fail UNLESS, you do the > research not by actual raw timings, but rather in the sensible way of > profiling the specific number of operations in an abstracted way. Sorry, are you trying to say that the way to determine better algorithms is not by measuring the actual time they take with real data on real machines, but by counting hypothetical abstract operations? Obviously we can and do use Big Oh analyse guide our investigations, but ultimately nothing beats actual timings. I can't begin to tell you how much time wasted trying to write O(N) algorithms in Python for some task when Python's O(N log N) sort was faster for any size of data I could create on my machine. -- Steve ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/3RPVQZFKPZLDCLYP6Z2RWGB6NT5CYU5O/ Code of Conduct: http://python.org/psf/codeofconduct/