[Tutor] Appropriate use of assignment expression
Leam Hall
leamhall at gmail.com
Sat Nov 20 16:05:19 EST 2021
On 11/20/21 14:05, dn via Tutor wrote:
> As a gentle guide, many would suggest that learners 'construct'
> one-liners in their 'full-fat code' version first.
And you can build your tests much more easily when your mind easily understands the code. I find myself doing a very small bit at a time and running the tests. Often, taking a slow and methodical approach helps me see places where a method can be extracted and the code be even cleaner.
> (counter-argument: yes there are applications where minute
> performance-gains are necessary, and thus such skills, valuable)
At which point I would ask, is Python the right tool for the task? In general, Python seems able to do a lot of things "fast enough" for most of us. If you really need faster you can drop in some C code or re-write in Go or Rust.
Leam
--
Systems Programmer (reuel.net/resume)
Scribe: The Domici War (domiciwar.net)
General Ne'er-do-well (github.com/LeamHall)
More information about the Tutor
mailing list