Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
54967d99
Commit
54967d99
authored
Sep 18, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#6925: rewrite docs for locals() and vars() a bit.
parent
332d7217
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
Doc/library/functions.rst
Doc/library/functions.rst
+8
-10
No files found.
Doc/library/functions.rst
View file @
54967d99
...
...
@@ -632,15 +632,13 @@ available. They are listed here in alphabetical order.
.. function:: locals()
Update and return a dictionary representing the current local symbol table.
Free variables are returned by :func:`locals` when it is called in function
blocks, but not in class blocks.
.. note::
The contents of this dictionary should not be modified; changes may not affect
the values of local variables used by the interpreter.
Free variables are returned by :func:`locals` when it is called in a function block.
Modifications of free variables may not affect the values used by the
interpreter. Free variables are not returned in class blocks.
The contents of this dictionary should not be modified; changes may not
affect the values of local and free variables used by the interpreter.
.. function:: long([x[, base]])
...
...
@@ -1359,10 +1357,10 @@ available. They are listed here in alphabetical order.
.. function:: vars([object])
Without a
rguments, return a dictionary corresponding to the current local symbol
table. With a module, class or class instance object as argument (or anything
else that has a :attr:`__dict__` attribute), returns a dictionary corresponding
to the object's symbol tabl
e.
Without a
n argument, act like :func:`locals`.
With a module, class or class instance object as argument (or anything else that
has a :attr:`__dict__` attribute), return that attribut
e.
.. note::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment