Re: LLM comparison

Mats Wichmann <[email protected]> Mon, 15 Jan 2024 13:00:17 -0700
Newsgroups gmane.comp.python.tutor
Message-ID <[email protected]>
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.


_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor