Skip to content

Commit b3a9d9a

Browse files
[Tree Building Exercise & Class Inheritance Concept] Spelling Fixes (#4009)
* Fix possessive 'its' spelling in documentation and tests * Corrected 'possibly' to 'possible * Revert "Corrected 'possibly' to 'possible" This reverts commit 9a42041. * revert: changes in reference/ folder [no important files changed]
1 parent 61dbb3a commit b3a9d9a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

concepts/class-inheritance/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ In situations where only a small amount of functionality needs to be customized
77

88
`Inheritance` describes `is a kind of` relationship between two or more classes, abstracting common details into super (_base_ or _parent_) class and storing specific ones in the subclass (_derived class_ or _child class_).
99

10-
To create a child class, specify the parent class name inside the pair of parenthesis, followed by it's name.
10+
To create a child class, specify the parent class name inside the pair of parenthesis, followed by its name.
1111
Example
1212
```python
1313
class Child(Parent):

exercises/practice/tree-building/.meta/example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def validate_record(record):
1818
raise ValueError('Only root should have equal record and parent id.')
1919

2020
if not record.equal_id() and record.parent_id >= record.record_id:
21-
raise ValueError("Node parent_id should be smaller than it's record_id.")
21+
raise ValueError("Node parent_id should be smaller than its record_id.")
2222

2323

2424
def BuildTree(records):

exercises/practice/tree-building/tree_building_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def test_root_node_has_parent(self):
111111
with self.assertRaises(ValueError) as err:
112112
BuildTree(records)
113113
self.assertEqual(type(err.exception), ValueError)
114-
self.assertEqual(err.exception.args[0], "Node parent_id should be smaller than it's record_id.")
114+
self.assertEqual(err.exception.args[0], "Node parent_id should be smaller than its record_id.")
115115

116116
def test_no_root_node(self):
117117
records = [
@@ -167,7 +167,7 @@ def test_cycle_indirectly(self):
167167
with self.assertRaises(ValueError) as err:
168168
BuildTree(records)
169169
self.assertEqual(type(err.exception), ValueError)
170-
self.assertEqual(err.exception.args[0], "Node parent_id should be smaller than it's record_id.")
170+
self.assertEqual(err.exception.args[0], "Node parent_id should be smaller than its record_id.")
171171

172172
def test_higher_id_parent_of_lower_id(self):
173173
records = [
@@ -179,7 +179,7 @@ def test_higher_id_parent_of_lower_id(self):
179179
with self.assertRaises(ValueError) as err:
180180
BuildTree(records)
181181
self.assertEqual(type(err.exception), ValueError)
182-
self.assertEqual(err.exception.args[0], "Node parent_id should be smaller than it's record_id.")
182+
self.assertEqual(err.exception.args[0], "Node parent_id should be smaller than its record_id.")
183183

184184
def assert_node_is_branch(self, node, node_id, children_count):
185185
self.assertEqual(node.node_id, node_id)

0 commit comments

Comments
 (0)