Skip to content

Commit 43d5949

Browse files
authored
Merge pull request #145 from Schubisu/typos_dunder_methods
minor suggestions for dunder methods section
2 parents 81a6846 + ebe1cf1 commit 43d5949

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/classes.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,15 @@ Output:
439439
Special dunder methods in classes
440440
==================================
441441

442-
Below we will see some special dunder methods (the methods which has `__`
443-
before and after the name, example: `__init__`, we call it *dunder init*).
442+
Below, we will see some special dunder methods (the methods which have double
443+
underscores `__` before and after the name, example: `__init__`, we call it
444+
*dunder init*).
444445

445446
__len__ method
446447
---------------
447448

448449
Dunder len is a method used by the *len* function to know the length of any
449-
iterator or similar objects. It should return an Integer. *len* function
450+
iterator or similar objects. It should return an Integer. The *len* function
450451
verifies if the returned value is Integer or not.
451452

452453
::
@@ -474,7 +475,7 @@ The output:
474475
__contains__ method
475476
--------------------
476477

477-
This method helps us to use `in` with out objects. For example, if we want to
478+
This method helps us to use `in` with our objects. For example, if we want to
478479
match `"kushal" in studnet1` to be `True`, we implement `__contains__` method
479480
in our class.
480481

0 commit comments

Comments
 (0)