Pythonic code review (Red Hat Security Blog)
Pythonic code review (Red Hat Security Blog)
Posted Dec 15, 2016 21:50 UTC (Thu) by markhb (guest, #1003)Parent article: Pythonic code review (Red Hat Security Blog)
It seems he wrote far more on "interesting ways Python does things" than he did on more general insights into reviewing code. Also, Java does the exact same foreach loop he says it doesn't:
for (Object o : Collection<Object>)
//do stuff with o
}
Posted Dec 15, 2016 23:52 UTC (Thu)
by lordsutch (guest, #53)
[Link] (5 responses)
Besides which, he specifically prefaces the section discussing for loops with "For folks coming from C."
Posted Dec 16, 2016 0:07 UTC (Fri)
by JanC_ (guest, #34940)
[Link]
Posted Dec 16, 2016 0:26 UTC (Fri)
by tialaramex (subscriber, #21167)
[Link] (3 responses)
Posted Dec 16, 2016 2:24 UTC (Fri)
by smckay (guest, #103253)
[Link]
Posted Dec 16, 2016 12:20 UTC (Fri)
by jtaylor (subscriber, #91739)
[Link] (1 responses)
Posted Dec 20, 2016 18:34 UTC (Tue)
by niner (subscriber, #26151)
[Link]
Posted Dec 16, 2016 15:37 UTC (Fri)
by khim (subscriber, #9252)
[Link]
I don't think he says that Java does not have a "foreach" loop. Of course it does! Who does not? Even C++ have a foreach loop novadays! What he says is that Python only have a foreach loop! It does not include a traditional C/Java for loop! And he's right, of course.
Pythonic code review (Red Hat Security Blog)
Pythonic code review (Red Hat Security Blog)
Java for-each
Java for-each
Java for-each
I still regularly have to regularly flag stuff like C89 un-scoped iteration counters in >= C99 code reviews despite this being standard since 17 years and available even longer in actual compilers.
Java for-each
Pythonic code review (Red Hat Security Blog)
