Hi Collin, > > - It explains ChatGPT's failure: Probably there are more explanations > > regarding += on strings, on the web, than regarding += on lists. > > So ChatGPT used the "common" explanation, for strings, and then > > substituted s/string/list/. > > Interesting. I know very little about ChatGPT so that explanation > works for me. :)
My experience is that ChatGPT (3.5) provides good answers for things that have a lot of mentions on the web. Whereas for things that are rarely mentioned, it starts to hallucinate and often provides wrong answers. Therefore, for routine questions around Python or C++, it is perfectly suited. Whereas for expert questions or things that require logical reasoning, you better do a fact-checking on the answer. > Sounds good. What do you think about two patches to normalize the > existing code with the conventions we've agreed upon: > > 1. Convert '+= [item]' to '.append(item)' OK. > 2. Use single quotes for string literals. OK in places where the strings don't contain single-quotes. In class GLEmiter, in particular, there are many strings that contain commands in shell syntax, and these often contain single-quotes. Here, choose the style that best avoids backslashing. Bruno