summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/decimal.rst10
-rw-r--r--Doc/library/functions.rst16
-rw-r--r--Doc/library/sys.rst12
3 files changed, 20 insertions, 18 deletions
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst
index ee746e9..e984edc 100644
--- a/Doc/library/decimal.rst
+++ b/Doc/library/decimal.rst
@@ -345,7 +345,7 @@ Decimal objects
*value* can be an integer, string, tuple, :class:`float`, or another :class:`Decimal`
object. If no *value* is given, returns ``Decimal('0')``. If *value* is a
string, it should conform to the decimal numeric string syntax after leading
- and trailing whitespace characters are removed::
+ and trailing whitespace characters, as well as underscores throughout, are removed::
sign ::= '+' | '-'
digit ::= '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
@@ -394,6 +394,10 @@ Decimal objects
:class:`float` arguments raise an exception if the :exc:`FloatOperation`
trap is set. By default the trap is off.
+ .. versionchanged:: 3.6
+ Underscores are allowed for grouping, as with integral and floating-point
+ literals in code.
+
Decimal floating point objects share many properties with the other built-in
numeric types such as :class:`float` and :class:`int`. All of the usual math
operations and special methods apply. Likewise, decimal objects can be
@@ -1075,8 +1079,8 @@ In addition to the three supplied contexts, new contexts can be created with the
Decimal('4.44')
This method implements the to-number operation of the IBM specification.
- If the argument is a string, no leading or trailing whitespace is
- permitted.
+ If the argument is a string, no leading or trailing whitespace or
+ underscores are permitted.
.. method:: create_decimal_from_float(f)
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index db04b10..c4fcd98 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -271,6 +271,9 @@ are always available. They are listed here in alphabetical order.
The complex type is described in :ref:`typesnumeric`.
+ .. versionchanged:: 3.6
+ Grouping digits with underscores as in code literals is allowed.
+
.. function:: delattr(object, name)
@@ -531,11 +534,14 @@ are always available. They are listed here in alphabetical order.
The float type is described in :ref:`typesnumeric`.
- .. index::
- single: __format__
- single: string; format() (built-in function)
+ .. versionchanged:: 3.6
+ Grouping digits with underscores as in code literals is allowed.
+.. index::
+ single: __format__
+ single: string; format() (built-in function)
+
.. function:: format(value[, format_spec])
Convert a *value* to a "formatted" representation, as controlled by
@@ -702,6 +708,10 @@ are always available. They are listed here in alphabetical order.
:meth:`base.__int__ <object.__int__>` instead of :meth:`base.__index__
<object.__index__>`.
+ .. versionchanged:: 3.6
+ Grouping digits with underscores as in code literals is allowed.
+
+
.. function:: isinstance(object, classinfo)
Return true if the *object* argument is an instance of the *classinfo*
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 9460b84..6ee6c49 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -1104,18 +1104,6 @@ always available.
thus may not be available in all Python implementations.
-.. function:: settscdump(on_flag)
-
- Activate dumping of VM measurements using the Pentium timestamp counter, if
- *on_flag* is true. Deactivate these dumps if *on_flag* is off. The function is
- available only if Python was compiled with ``--with-tsc``. To understand
- the output of this dump, read :file:`Python/ceval.c` in the Python sources.
-
- .. impl-detail::
- This function is intimately bound to CPython implementation details and
- thus not likely to be implemented elsewhere.
-
-
.. function:: set_coroutine_wrapper(wrapper)
Allows intercepting creation of :term:`coroutine` objects (only ones that