Skip to content

Commit d773c35

Browse files
docs: Fix grammatical errors
1 parent cf852f1 commit d773c35

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Classes/typesOfMethods.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def make_pretty(func):
2121
def ordinary():
2222
print("I am ordinary")
2323
```
24-
When you run the following codes in shell
24+
When you run the following codes in a shell
2525

2626
```python
2727
>>>ordinary()
@@ -66,11 +66,11 @@ ordinary = make_pretty(ordinary)
6666
```
6767

6868

69-
# Regular Methods, Class Methods and Static Methods
69+
# Regular Methods, Class Methods, and Static Methods
7070

7171
## Regular Methods
7272
* They are plain functions written inside a class. They require an instance variable.
73-
* The word 'self' is generally used in the naming of the first arguement which refers to the current instance.
73+
* The word 'self' is generally used in the naming of the first argument which refers to the current instance.
7474
* The statements written inside this affects a single instance/object presently in use.
7575
* It requires no additional syntax.
7676

@@ -81,12 +81,12 @@ def Addition(self, a, b): # 'a' and 'b' are instance variables
8181
return sum
8282
```
8383

84-
The above function return the sum of two variables held inside one instance.
84+
The above function returns the sum of two variables held inside one instance.
8585

8686
## Class Methods
8787

8888
* They are methods/functions which require a class variable.
89-
* The word 'cls' is generally used in the naming of the arguement which refers to the current class.
89+
* The word 'cls' is generally used in the naming of the argument which refers to the current class.
9090
* The statements written inside this affects the entire class instances/objects.
9191
* The decorator keyword '@classmethod' is used before the actual function.
9292

@@ -109,7 +109,7 @@ The above function upon calling changes the value of 'raise_amount' to 1.5 for a
109109

110110
## Static Methods
111111

112-
* They are methods/functions which do not require neither class variable nor instance variable.
112+
* They are methods/functions which do require neither class variable nor instance variable.
113113
* The decorator keyword '@staticmethod' is used before the actual function.
114114
* Static methods, much like class methods, are methods that are bound to a class rather than its object.
115115
* They do not require a class instance creation. So, are not dependent on the state of the object.
@@ -130,7 +130,7 @@ class Person:
130130
### Difference b/w classmethod and staticmethod
131131

132132
* Static method knows nothing about the class and just deals with the parameters.
133-
* Class method works with the class since its parameter is always the class itself.
133+
* The class method works with the class since its parameter is always the class itself.
134134

135135

136136

0 commit comments

Comments
 (0)