2 ms·
List comprehensions read like what they are (except for the stupid backwards order if you have multiple 'for's). Decorators are pretty opaque; idiomatic python
by lmm 14y ago
List comprehensions read like what they are (except for the stupid backwards order if you have multiple 'for's).
Decorators are pretty opaque; idiomatic python makes minimal use of them, and uses them only for things that don't change the meaning of the method inside. I've never used @classmethod and hope to never have to. I don't think it's fair to compare to an STL iterator, which is something you're encouraged to use as much as possible.
I don't know what you're talking about for iterables; aren't they obvious?
- ajross 14y agoThe iterable point was that the syntax is obvious but the behavior is not. They "look like plain data" sometimes, and some times they don't; and the only way to tell the difference is to know the characteristics of what you are iterating over. They're the same kind of too-clever-by-half design that C++ tends to confuse people with. People who know it love it, and people who don't think it's voodoo.