Sunday, October 06, 2024

Google search provides now generated AI for software coding

It is a great new feature provided by Google search. 

I have used and learnt from it for my own Python programming a number of times. Often the tips are quite good for a non expert like me.

However, following is an obviously disappointing example I was shown yesterday.

What is missing or even wrong?

  1. Importing IntEnum, unique instead of Enum
  2. Decorating the class with @unique
  3. The Color class should have been derived/subclassed from IntEnum instead of Enum
  4. The method chosen is an instance method. It should be a @classmethod




No comments: