8 ms·
IMHO this is one of the worst ways to improve your Python skills. Instead, focus on what the normal, robust, beautiful, clear, and idiomatic solutions to probl
by raymondh 4y ago
IMHO this is one of the worst ways to improve your Python skills. Instead, focus on what the normal, robust, beautiful, clear, and idiomatic solutions to problems.
There is an enormous amount of quality training material available as well as excellent source code to major projects.
Most people would be better off just spending a hour or so with the tutorial at docs.python.org.
I get people coming to me asking for a job teaching Python when they don't know of some the material in the tutorial. Most have never read the FAQs and aren't aware of common solutions to common problems. To me, if you want to build your skills, start there. Get in the habit of reading docs, even boring ones, and occasionally read some of the source code from your favorite libraries.
That said, if you've already a very strong Python programmer, one possible use for these snippets is to help you root out any last, misconceptions of minor details.
But, you should resist the urge to show-off or use almost any of these "skills". There are a lot of cute things we can do with chained comparisons, but the only sensible things are: lo <= x <= hi or f(x) == g(x) == h(x). Anything else is too weird for communicating with the human beings. Likewise, you should only use "is" for None tests until you have strong understanding of identity guarantees.
- deleted 4y ago[deleted]
- chaostheory 4y agoI feel that it’s a decent approach for anyone already familiar with Python, since it’s making you think how the platform works underneath the surface vs just understanding it from the shallow language syntax level.
- lmc 4y agoIn the normal course of events, absolutely. This is hacker news though :-)
- raymondh 4y agoFair enough :-)