mmpy_bot
mmpy_bot copied to clipboard
optimization for loops and refac to py3
- rewrite for loops on list comprehentions
- rewrite python2 class on python3
Hi @ArtemIsmagilov thanks a lot for all the PRs and code contributions. I'm going through them as time allows.
This one however includes some rewrites that use a different style from the one used elsewhere in the code. Specifically the multi for/if list comprehensions.
Personally, I'm not a fan of this syntax due to readability (e.g. lines 76-87). I find it harder to reason given it partially inverts the order of reading, including a walrus operator in the middle which extends to the comprehension scope. At the same time I understand that it's a cleaner way to handle the deep/nested indentation.
As this is my personal point of view I would also like to invite @attzonko to share his thoughts on this.
Hi @unode , thank you very much for the code review. Don't worry about checking my PRs, I don't expect rushed reviews, check at your convenience. Regarding the list comprehension style, it’s up to you to decide. Readability, understanding and reliability of code for a developer are much more important than performance, in my humble opinion. It seems important to you what happened in this cycle. In this case, it will be better to leave your code unchanged as you suggested.
Code Climate has analyzed commit 109c55bc and detected 0 issues on this pull request.
View more on Code Climate.