Skip to content

Commit 955f823

Browse files
committed
Applied fixes from code review.
1 parent 810f97f commit 955f823

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

concepts/enums/introduction.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction
22

3-
In Python, [an `enum`](https://docs.python.org/3/library/enum.html) is a set of names that are bound to unique `literal`, or `constant` values.
3+
In Python, [an `enum`][enum-docs] is a set of names that are bound to unique `literal`, or `constant` values.
44
`Enums` are defined by inheriting from or subclassing an `Enum` class.
55
Built-in `enum` types are available in the module `enum` and the class `Enum` can be imported using `from enum import Enum`.
66

@@ -45,7 +45,7 @@ for member in Color:
4545
#=> (GREEN, 2)
4646
```
4747

48-
`Enum` members can be compared using [`is` (_identity operator_)](https://www.w3schools.com/python/ref_keyword_is.asp) or `is not`. The `==` or `!=` (_equality operators_) work likewise:
48+
`Enum` members can be compared using [`is` (_identity operator_)][identity-keyword] or `is not`. The `==` or `!=` (_equality operators_) work likewise:
4949

5050
```python
5151
a = Color.RED
@@ -68,3 +68,6 @@ g is Color.GREEN
6868
g
6969
#=> <Color.GREEN: 2>
7070
```
71+
72+
[enum-docs]: https://docs.python.org/3/library/enum.html
73+
[identity-keyword]: https://www.w3schools.com/python/ref_keyword_is.asp

concepts/fractions/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Fraction(2, 3) # automatically simplified
2929
True
3030
```
3131

32-
The fractions constructor can also parse a string representation:
32+
The fraction constructor can also parse a string representation:
3333

3434

3535
```python

concepts/fractions/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Fraction(2, 3) # automatically simplified
2424
True
2525
```
2626

27-
The fractions constructor can also parse a string representation:
27+
The fraction constructor can also parse a string representation:
2828

2929
```python
3030
>>> f3 = Fraction('2/3')

0 commit comments

Comments
 (0)