summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.4.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.4.rst')
-rw-r--r--Doc/whatsnew/3.4.rst17
1 files changed, 16 insertions, 1 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 7681fae..c8791e4 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -1360,6 +1360,19 @@ blocks allocated by the interpreter (in CPython with the default
especially if automated via a test suite. (Contributed by Antoine Pitrou
in :issue:`13390`.)
+When the Python interpreter starts in :ref:`interactive mode
+<tut-interactive>`, it checks for an :data:`~sys.__interactivehook__` attribute
+on the :mod:`sys` module. If the attribute exists, its value is called with no
+arguments just before interactive mode is started. The check is made after the
+:envvar:`PYTHONSTARTUP` file is read, so it can be set there. The :mod:`site`
+module :ref:`sets it <rlcompleter-config>` to a function that enables tab
+completion and history saving (in :file:`~/.python-history`) if the platform
+supports :mod:`readline`. If you do not want this (new) behavior, you can
+override it in :envvar:`PYTHONSTARTUP`, :mod:`sitecustomize`, or
+:mod:`usercustomize` by deleting this attribute from :mod:`sys` (or setting it
+to some other callable). (Contributed by Éric Araujo and Antoine Pitrou in
+:issue:`5845`.)
+
textwrap
--------
@@ -1694,7 +1707,9 @@ Other Improvements
most POSIX systems it can and should be used in the ``#!`` line of system
scripts. (Contributed by Christian Heimes in :issue:`16499`.)
-* Tab-completion is now enabled by default in the interactive interpreter.
+* Tab-completion is now enabled by default in the interactive interpreter
+ on systems that support :mod:`readline`. History is also enabled by default,
+ and is written to (and read from) the file :file:`~/.python-history`.
(Contributed by Antoine Pitrou and Éric Araujo in :issue:`5845`.)
* Invoking the Python interpreter with ``--version`` now outputs the version to