Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thank You. That was a really concise explanation.
In a class, there are three types of methods: instance methods, class methods, and static methods. Instance methods are defined with a mandatory parameter
self
, alongside any other required parameters. For class methods, we use the@classmethod
decorator before the method and include a mandatory parameter namedcls
, along with other parameters. Static methods, on the other hand, don't require a decorator and function like normal Python functions without needing a mandatory parameter. When written within a class, they behave as static methods by default, but you can add clarity by using the@staticmethod
decorator. Remember it's common practice to use decorators and highly recommended.Why did you use @staticmethod on top of all the functions? (I am a newbie so pardon my questions)
I believe as a best practice is important to add comments inside a function for other developers. This was the simple way I found to code it in 1 line. let me know your comments.
Interesting the way you create the return %i %i. Something new for me thx
Easy to understand!