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?
- Importing IntEnum, unique instead of Enum
- Decorating the class with @unique
- The Color class should have been derived/subclassed from IntEnum instead of Enum
- The method chosen is an instance method. It should be a @classmethod
No comments:
Post a Comment