Skip to content

Commit

Permalink
Small tweaks to documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Jun 6, 2020
1 parent a80147a commit 8c2491b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ user.
>>> try:
... with open(filename) as f:
... config = f.read()
... except (OSError, IOError) as e:
... except OSError as e:
... error(os_error(e))
error: config: no such file or directory.
Expand All @@ -352,7 +352,7 @@ used when reporting errors:
... try:
... with open(filename) as f:
... config = f.read()
... except (OSError, IOError) as e:
... except OSError as e:
... raise Error(os_error(e))
>>> try:
Expand Down
2 changes: 1 addition & 1 deletion doc/user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,7 @@ os_error
>>> try:
... with open('temperatures.csv') as f:
... contents = f.read()
... except (OSError, IOError) as e:
... except OSError as e:
... error(os_error(e))
myprog error: temperatures.csv: no such file or directory.
Expand Down
7 changes: 4 additions & 3 deletions inform/inform.py
Original file line number Diff line number Diff line change
Expand Up @@ -999,8 +999,9 @@ def full_stop(sentence, end='.', allow='.?!'):
"""Add period to end of string if it is needed.
A full stop (a period) is added if there is no terminating punctuation at the
end of the string. Any white space at the end of the string is removed
before looking for terminal punctuation.
end of the string. The argument is first converted to a string, and then
any white space at the end of the string is removed before looking for
terminal punctuation. The return value is always a string.
Examples::
Expand All @@ -1014,7 +1015,7 @@ def full_stop(sentence, end='.', allow='.?!'):
>>> full_stop('Is the file is out of date?')
'Is the file is out of date?'
You can override the allowed endings and desired ending.
You can override the allowed and desired endings.
>>> cases = '1, 3 9, 12.'.split()
>>> print(*[full_stop(c, end=',', allow=',.') for c in cases])
Expand Down

0 comments on commit 8c2491b

Please sign in to comment.