... | ... | @@ -341,7 +341,7 @@ Whenever Python code is written, the first function most people write is usually |
|
|
members) of each new object. For now... let us focus on three methods:
|
|
|
|
|
|
- `__str__` - generates a human readable string for output.
|
|
|
- `__repr--` - generates a *complete* string for debugging, often in the form
|
|
|
- `__repr__` - generates a *complete* string for debugging, often in the form
|
|
|
of a string that fully describes an object.
|
|
|
- `__eq__` - compares two objects, returning `True` if they are equal. The
|
|
|
objects need not be of the same type.
|
... | ... | @@ -524,7 +524,7 @@ There are a few interesting mechanics... |
|
|
|
|
|
1. a decorator (i.e., `@staticmethod`)
|
|
|
2. constants (i.e., `PROMPT_MESSAGE` and `REFERENCE_CYLON`)
|
|
|
3. `__eq__`, `__hash__`, __str__`, and `__deepcopy__` methods
|
|
|
3. `__eq__`, `__hash__`, `__str__`, and `__deepcopy__` methods
|
|
|
|
|
|
|
|
|
## Tic-Tac-Toe Tests
|
... | ... | |