On 24/03/2016 14:01, Chris Angelico wrote:
I don't, until it's pointed out. At that point, someone who respects the language will at least pay *some* heed to the changed recommendations; what we're seeing here is that he continues to use C idioms and then complain that Python is slow. I don't expect him to magically know what Python idioms are, but when the thread has gone on this long and he's still showing the same style of code, that's when I start to agree with Ben that he's not paying heed to Pythonic vs non-Pythonic.
Have a look at the short thread 'Rotation' in comp.programming starting 4-Jan-2016.
(Possible link: https://groups.google.com/forum/#!searchin/comp.programming/rotation/comp.programming/aQh4n2HGtaU/sSbcyjqfEQAJ)
Someone posts an algorithm in C++, I post a version in my language, someone else calls that a 'blub' solution and offers a much shorter version in /their/ language.
I point out that their solution just uses a built-in to do the work. It by-passes the question of the algorithm, which was the point of the thread. I also point out that I also gave a one-line version in my language.
What you're trying to say I guess is that such a one-liner would be Pythonic. And what I'm saying is that that would defeat the object of what I'm trying to do.
-- Bartc -- https://mail.python.org/mailman/listinfo/python-list