[Tutor] scratching my head
Laura Creighton
lac at openend.se
Mon Aug 3 11:18:10 CEST 2015
In a message of Mon, 03 Aug 2015 18:22:32 +1000, Cameron Simpson writes:
>That depends. This is the tutor list; we're helping Clayton debug his code as
>an aid to learning. While it's good to know about the facilities in the
>standard library, pointing him directly at fnmatch (which I'd entirely
>forgotten) is the "give a man a fish" approach to help; a magic black box to do
>the job for him.
>
>Besides, I'm not sure fnmatch is much better for his task than the more direct
>methods being discussed.
And I am certain. It works exactly as he said he wanted -- a less
cumbersome way to solve this problem, which he thought would be done
some way with a for loop, looping over extensions, instead of the
cumbersome way he is doing things.
His design sense was perfectly fine; there is an elegant way to solve
the problem precisely along the lines he imagined -- he just wasn't
aware of this bit of the standard library.
There is no particular virtue in teaching somebody how to build a
pneumatic drill in order to crack walnuts.
Laura
More information about the Tutor
mailing list