2 ms·
Appreciating that Norvig is much smarter than myself... I find his style to be not great, too many code-golfing one liners. Not everything has to be a list com
by 41b696ef1113 5y ago
Appreciating that Norvig is much smarter than myself...
I find his style to be not great, too many code-golfing one liners. Not everything has to be a list comprehension (or even, a double list comprehension). Give me a boring loop with minimal action per line, please.
- systemvoltage 5y agoNorvig's approach of converting thoughts into a program is what you need to focus on. It is trivial to convert a list comprehension into a loop. In "When is Cheryl's birthday?" [1], the way he converts the problem into functional units is insane. A couple of list comprehensions shouldn't scare you. Look above and beyond the details. [1] https://github.com/norvig/pytudes/blob/main/ipynb/Cheryl.ipynb https://github.com/norvig/pytudes/blob/main/ipynb/Cheryl.ipy...