Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d0c04b0

Browse files
Update README.md
1 parent c010ded commit d0c04b0

File tree

1 file changed

+2
-2
lines changed
  • exercises/044-static_and_class_methods

1 file changed

+2
-2
lines changed

‎exercises/044-static_and_class_methods/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# `044` static and class methods
22

3-
A **class method** is a method that is bound to the class and not the instance of the class. It takes the class itself as its first parameter, often named cls. Class methods are defined using the @classmethod decorator.
3+
A **class method** is a method that is bound to the class and not the instance of the class. It takes the class itself as its first parameter, often named "cls". Class methods are defined using the @classmethod decorator.
44

55
The primary characteristic of a class method is that it can access and modify class-level attributes, but it cannot access or modify instance-specific attributes since it doesn't have access to an instance of the class. Class methods are often used for tasks that involve the class itself rather than individual instances.
66

@@ -86,4 +86,4 @@ sum_of_numbers = MathOperations.add_numbers(10, 15)
8686

8787
+ Remember, To create a static method, use the `@staticmethod` decorator above the method definition.
8888

89-
+ Anything you still don't fully get, we encourage you to always use the tools the internet provides you to search for information and clear most of your doubts (all developers do this don't worry).
89+
+ For anything you still don't fully get, we encourage you to always use the tools the internet provides you to search for information and clear most of your doubts (all developers do this, don't worry).

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /