Skip to content

Commit a1646b2

Browse files
docs: ix a minor error in the python quickstarts tutorial. (#1391)
In section **8. Create the application**, there is a line: ```python return Timetable(demo_data.name, timeslots, rooms, lessons) ``` This will cause `NameError: name 'demo_data' is not defined` because `demo_data` is not defined anywhere in the `generate_demo_data()` function. A possible hotfix is to just directly assign a name: ```python return Timetable("DEMO_DATA", timeslots, rooms, lessons) ```
1 parent f67c507 commit a1646b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/src/modules/ROOT/pages/quickstart/hello-world/hello-world-quickstart.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ def generate_demo_data() -> Timetable:
710710
lessons.append(Lesson(next(ids), "English", "P. Cruz", "10th grade"))
711711
lessons.append(Lesson(next(ids), "Spanish", "P. Cruz", "10th grade"))
712712

713-
return Timetable(demo_data.name, timeslots, rooms, lessons)
713+
return Timetable("DEMO_DATA", timeslots, rooms, lessons)
714714

715715

716716
def print_timetable(time_table: Timetable) -> None:

0 commit comments

Comments
 (0)