File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ The :mod:`csv` module defines the following functions:
70
70
section :ref: `csv-fmt-params `.
71
71
72
72
Each row read from the csv file is returned as a list of strings. No
73
- automatic data type conversion is performed unless the `` QUOTE_NONNUMERIC ` ` format
73
+ automatic data type conversion is performed unless the :data: ` QUOTE_NONNUMERIC ` format
74
74
option is specified (in which case unquoted fields are transformed into floats).
75
75
76
76
A short usage example::
@@ -331,8 +331,14 @@ The :mod:`csv` module defines the following constants:
331
331
332
332
Instructs :class: `writer ` objects to quote all non-numeric fields.
333
333
334
- Instructs :class: `reader ` objects to convert all non-quoted fields to type * float * .
334
+ Instructs :class: `reader ` objects to convert all non-quoted fields to type :class: ` float ` .
335
335
336
+ .. note ::
337
+ Some numeric types, such as :class: `bool `, :class: `~fractions.Fraction `,
338
+ or :class: `~enum.IntEnum `, have a string representation that cannot be
339
+ converted to :class: `float `.
340
+ They cannot be read in the :data: `QUOTE_NONNUMERIC ` and
341
+ :data: `QUOTE_STRINGS ` modes.
336
342
337
343
.. data :: QUOTE_NONE
338
344
You can’t perform that action at this time.
0 commit comments