Skip to content

Commit

Permalink
Update docs (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoknjas committed Jul 29, 2022
1 parent 3b412c5 commit a19cf1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions chess/pgn.py
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,10 @@ def read_game(handle: TextIO, *, Visitor: Any = GameBuilder) -> Any:
>>> pgn = open("data/pgn/kasparov-deep-blue-1997.pgn", encoding="utf-8")
If you get a UnicodeDecodeError, including the following parameters might help:
>>> pgn = open("data/pgn/kasparov-deep-blue-1997.pgn", 'r', errors='replace')
Use :class:`~io.StringIO` to parse games from a string.
>>> import io
Expand Down

0 comments on commit a19cf1e

Please sign in to comment.