Skip to content

Commit 14df174

Browse files
committed
Fix possessive 'its' spelling in documentation and tests
1 parent 61dbb3a commit 14df174

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
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)

reference/concepts/builtin_types/list.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A multi-dimensional list-with-a-list is used as a simple (but not very efficient
88

99
TODO: ADD MORE DETAIL
1010

11-
See the Python documentation entries for the [mutable][mutation] [`list` type][docs-list-type] and it's [constructor][list-as-function]. This is Python's most commonly used [sequential collection][docs-sequence-types], and as it allows _heterogeneous data_ it's quite different from the [fixed array][general-concept-array] and [singly-linked list][general-concept-list] types you may have encountered in other, less flexible, languages.
11+
See the Python documentation entries for the [mutable][mutation] [`list` type][docs-list-type] and its [constructor][list-as-function]. This is Python's most commonly used [sequential collection][docs-sequence-types], and as it allows _heterogeneous data_ it's quite different from the [fixed array][general-concept-array] and [singly-linked list][general-concept-list] types you may have encountered in other, less flexible, languages.
1212

1313
[variable-length-quantity]: ../../exercise-concepts/variable-length-quantity.md
1414
[markdown]: ../../exercise-concepts/markdown.md

reference/concepts/class_inheritance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
TODO: ADD MORE
44

55
- The default `__str___` method is inherited from `Object`, which every class in Python inherits from. (See: inheritance) [phone-number](../exercise-concepts/phone-number.md)
6-
- a "subclass" will inherit all methods, attributes from it's parent class, and can then override methods as needed. Overriding means the logic in the parent class is not used. The `super` builtin function (not shown here) exists to allow the programmer to defer logic up the inheritance chain to the parent class when needed. [phone-number](../exercise-concepts/phone-number.md)
6+
- a "subclass" will inherit all methods, attributes from its parent class, and can then override methods as needed. Overriding means the logic in the parent class is not used. The `super` builtin function (not shown here) exists to allow the programmer to defer logic up the inheritance chain to the parent class when needed. [phone-number](../exercise-concepts/phone-number.md)
77
- the knowledge of inheritance can be useful in this exercises because all `Exceptions` types inherit from the base class [variable-length-quantity](../exercise-concepts/variable-length-quantity.md)

reference/exercise-concepts/phone-number.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class PhoneNumber:
4343
- [Methods][methods]: classes can have instance _methods_ which are called from an instance of the class (as opposed to class methods, called from the Class itself). The first parameter of an instance method is always `self`, which is provided when calling from the instance (i.e. the programmer does not need to pass it as an argument explicitly). Static methods are methods called from the class itself, and are not connected to an instance of the class. They have access to class attributes (those defined on the class, not connected to the `self`), and do not require an instance of the class to exist. Classes can also define a `property` by using the `@property` decorator (not shown here); a `property` can be "lazily evaluated" to avoid unneeded computation
4444
- [Non-Public Methods][non-public-methods]: Methods or attributes (including those of an imported module) prefixed with an underscore, `_`, are conventionally treated as "non-public" methods. Python does not support data privacy in the way a language like Java does. Instead convention dictates that methods and attributes that are not prefixed with a single underscore can be expected to remain stable along with semver, i.e. a public method will be backwards compatible with minor version updates, and can change with major version updates. Generally, importing non-public functions or using non-public methods is discouraged, though Python will not explicitly stop the programmer from doing so.
4545
- [Implied Argument][implied-argument]: within the class definition, methods and properties can be accessed via the `self.` notation
46-
- [Inheritance][inheritance]: a "subclass" will inherit all methods, attributes from it's parent class, and can then override methods as needed. Overriding means the logic in the parent class is not used. The `super` builtin function (not shown here) exists to allow the programmer to defer logic up the inheritance chain to the parent class when needed.
46+
- [Inheritance][inheritance]: a "subclass" will inherit all methods, attributes from its parent class, and can then override methods as needed. Overriding means the logic in the parent class is not used. The `super` builtin function (not shown here) exists to allow the programmer to defer logic up the inheritance chain to the parent class when needed.
4747
- [Standard Library][standard-library]: the `re` module is an example of the Python stdlib (standard library), or included code libraries and tools that are frequently used in Python
4848
- [Import][import]: to use the module, the `import` syntax can be used
4949
- [Iterables][iterables]: characters in a string are _iterables_ and are subject to index and slice access as described below

0 commit comments

Comments
 (0)