@@ -204,18 +204,24 @@ The following exceptions are the exceptions that are usually raised.
204
204
assignment fails. (When an object does not support attribute references or
205
205
attribute assignments at all, :exc: `TypeError ` is raised.)
206
206
207
- The :attr: `name ` and :attr: `obj ` attributes can be set using keyword-only
208
- arguments to the constructor. When set they represent the name of the attribute
209
- that was attempted to be accessed and the object that was accessed for said
210
- attribute, respectively.
207
+ The optional *name * and *obj * keyword-only arguments
208
+ set the corresponding attributes:
209
+
210
+ .. attribute :: name
211
+
212
+ The name of the attribute that was attempted to be accessed.
213
+
214
+ .. attribute :: obj
215
+
216
+ The object that was accessed for the named attribute.
211
217
212
218
.. versionchanged :: 3.10
213
219
Added the :attr: `name ` and :attr: `obj ` attributes.
214
220
215
221
.. exception :: EOFError
216
222
217
223
Raised when the :func: `input ` function hits an end-of-file condition (EOF)
218
- without reading any data. (N.B. : the :meth: `io.IOBase.read ` and
224
+ without reading any data. (Note : the :meth: `! io.IOBase.read ` and
219
225
:meth: `io.IOBase.readline ` methods return an empty string when they hit EOF.)
220
226
221
227
@@ -312,9 +318,11 @@ The following exceptions are the exceptions that are usually raised.
312
318
unqualified names. The associated value is an error message that includes the
313
319
name that could not be found.
314
320
315
- The :attr: `name ` attribute can be set using a keyword-only argument to the
316
- constructor. When set it represent the name of the variable that was attempted
317
- to be accessed.
321
+ The optional *name * keyword-only argument sets the attribute:
322
+
323
+ .. attribute :: name
324
+
325
+ The name of the variable that was attempted to be accessed.
318
326
319
327
.. versionchanged :: 3.10
320
328
Added the :attr: `name ` attribute.
@@ -382,7 +390,7 @@ The following exceptions are the exceptions that are usually raised.
382
390
383
391
The corresponding error message, as provided by
384
392
the operating system. It is formatted by the C
385
- functions :c:func: `perror ` under POSIX, and :c:func: `FormatMessage `
393
+ functions :c:func: `! perror ` under POSIX, and :c:func: `! FormatMessage `
386
394
under Windows.
387
395
388
396
.. attribute :: filename
@@ -398,7 +406,7 @@ The following exceptions are the exceptions that are usually raised.
398
406
.. versionchanged :: 3.3
399
407
:exc: `EnvironmentError `, :exc: `IOError `, :exc: `WindowsError `,
400
408
:exc: `socket.error `, :exc: `select.error ` and
401
- :exc: `mmap.error ` have been merged into :exc: `OSError `, and the
409
+ :exc: `! mmap.error ` have been merged into :exc: `OSError `, and the
402
410
constructor may return a subclass.
403
411
404
412
.. versionchanged :: 3.4
@@ -597,7 +605,7 @@ The following exceptions are the exceptions that are usually raised.
597
605
handled, the Python interpreter exits; no stack traceback is printed. The
598
606
constructor accepts the same optional argument passed to :func: `sys.exit `.
599
607
If the value is an integer, it specifies the system exit status (passed to
600
- C's :c:func: `exit ` function); if it is ``None ``, the exit status is zero; if
608
+ C's :c:func: `! exit ` function); if it is ``None ``, the exit status is zero; if
601
609
it has another type (such as a string), the object's value is printed and
602
610
the exit status is one.
603
611
0 commit comments