Re:Python 3.6.0 released
by SeanDav on Friday December 23, 2016 @12:57PM
(#13246133)
All these methods are really just multiple sides of the same coin. All I see is different syntax, none looks any better from my point of view and unless there is a clear performance benefit, just use what you are used to, or what your coding standards define.
[ Parent
| on HN ]
Re:Python 3.6.0 released
by lyschoening on Friday December 23, 2016 @01:22PM
(#13246320)
ii. vs iii. boils down to explicit rather than implicit. iii. is simply easier to understand. I believe most people would also agree that ii. doesn't look particularly nice.
Re:Python 3.6.0 released
by NegativeLatency on Friday December 23, 2016 @01:08PM
(#13246217)
I think in general the comprehension is faster because of how method calls and symbol lookups work in python. For the most part it's just a style thing.