Guido van Rossum | e876949 | 1992-08-13 12:14:11 +0000 | [diff] [blame^] | 1 | Examples of classes that implement special operators (see class.doc): |
| 2 | |
| 3 | Complex.py Complex numbers |
| 4 | Dbm.py Wrapper around built-in dbm, supporting arbitrary values |
| 5 | Range.py Example of a generator: re-implement built-in range() |
| 6 | Rat.py Rational numbers |
| 7 | Vec.py A simple vector class |
| 8 | |
| 9 | (For straightforward examples of basic class features, such as use of |
| 10 | methods and inheritance, see the library code -- especially the window |
| 11 | modules are full of them.) |