File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,24 @@ Ellipsis
182
182
related to mathematical numbers, but subject to the limitations of numerical
183
183
representation in computers.
184
184
185
+ The string representations of the Numeric classes, computed by
186
+ :meth: `__repr__ ` and :meth: `__str__ `, have the following
187
+ properties:
188
+
189
+ * They are valid numeric literals which, when passed to their
190
+ class constructor, produce an object having the value of the
191
+ original numeric.
192
+
193
+ * The representation is in base 10, when possible.
194
+
195
+ * Leading zeros, possibly excepting a single zero before a
196
+ decimal point, are not shown.
197
+
198
+ * Trailing zeros, possibly excepting a single zero after a
199
+ decimal point, are not shown.
200
+
201
+ * A sign is shown only when the number is negative.
202
+
185
203
Python distinguishes between integers, floating point numbers, and complex
186
204
numbers:
187
205
You can’t perform that action at this time.
0 commit comments