Skip to content

Commit

Permalink
Merge pull request #767 from collective/niccokunzmann-shorten-example
Browse files Browse the repository at this point in the history
Shorten first example
  • Loading branch information
niccokunzmann authored Jan 31, 2025
2 parents d38d267 + 9e0ae63 commit ac74257
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Changelog

Minor changes:

- ...
- Shorten first example in documentation.

Breaking changes:

Expand Down
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ You can open an ``.ics`` file and see all the events:
>>> import icalendar
>>> from pathlib import Path
>>> ics_path = Path("src/icalendar/tests/calendars/example.ics")
>>> with ics_path.open() as f:
... calendar = icalendar.Calendar.from_ical(f.read())
>>> for event in calendar.walk('VEVENT'):
>>> calendar = icalendar.Calendar.from_ical(ics_path.read_bytes())
>>> for event in calendar.events:
... print(event.get("SUMMARY"))
New Year's Day
Orthodox Christmas
Expand Down

0 comments on commit ac74257

Please sign in to comment.