TutorialDivingIn04: section4.py
| File section4.py, 426 bytes (added by ged, 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | # you don't need to copy-paste this line, it's only useful when using the data |
| 2 | # as "from section4 import *" |
| 3 | from model import * |
| 4 | |
| 5 | rscott = Director(name="Ridley Scott") |
| 6 | glucas = Director(name="George Lucas") |
| 7 | alien = Movie(title="Alien", year=1979) |
| 8 | brunner = Movie(title="Blade Runner", year=1982) |
| 9 | swars = Movie(title="Star Wars", year=1977) |
| 10 | |
| 11 | rscott.movies.append(brunner) |
| 12 | rscott.movies.append(alien) |
| 13 | swars.director = glucas |
