[Tutor] LLM comparison
Mats Wichmann
mats at wichmann.us
Mon Jan 15 15:00:17 EST 2024
On 1/15/24 12:12, dn via Tutor wrote:
> There was no need for ChatGPT (response 3) to import itertools (it's not
> used anyway) - the built-in function does the job.
in fact, as written, it's incorrect:
from itertools import range
that will cause an import error.
> That Claude2 failed to suggest a list-comprehension was a surprise. What
> do you think?
"Modern" Python lore tends to favor comprehensions and deemphasize
lambdas, so yes, this is a bit strange.
> The intermediate programmer leverages the built-in range() function
and typecasts it to a list directly.
I also am not a favorite of using the term "type cast" for Python.
Maybe it's just me, but you're not reinterpreting the type of an object,
you're creating a new one from the value of the original one. However,
I've been known to get hung up on language usage, it does seem to be a
widely used term.
More information about the Tutor
mailing list