[Python-checkins] bpo-28681: Clarify multiple function names in the tutorial (GH-21340) (GH-21344)
Miss Islington (bot)
webhook-mailer at python.org
Sun Jul 5 22:08:04 EDT 2020
https://github.com/python/cpython/commit/6790f9badda47c7aa0fe4b0b5f090d6ca0c477d5
commit: 6790f9badda47c7aa0fe4b0b5f090d6ca0c477d5
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020年07月05日T23:07:59-03:00
summary:
bpo-28681: Clarify multiple function names in the tutorial (GH-21340) (GH-21344)
* improve control flow docs
* Add also
Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>
(cherry picked from commit d12af71047f0eae86440654d3ea74c032c7c3558)
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah at users.noreply.github.com>
Co-authored-by: Joannah Nanjekye <33177550+nanjekyejoannah at users.noreply.github.com>
files:
M Doc/tutorial/controlflow.rst
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index f05f5edd5ccc4..de2c73a398eda 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -297,11 +297,10 @@ passed using *call by value* (where the *value* is always an object *reference*,
not the value of the object). [#]_ When a function calls another function, a new
local symbol table is created for that call.
-A function definition introduces the function name in the current symbol table.
-The value of the function name has a type that is recognized by the interpreter
-as a user-defined function. This value can be assigned to another name which
-can then also be used as a function. This serves as a general renaming
-mechanism::
+A function definition associates the function name with the function object in
+the current symbol table. The interpreter recognizes the object pointed to by
+that name as a user-defined function. Other names can also point to that same
+function object and can also be used to access the function::
>>> fib
<function fib at 10042ed0>
More information about the Python-checkins
mailing list