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
f04779b5
Commit
f04779b5
authored
Jun 28, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#3229 fix typo and expand notes a little
parent
ed25b2c3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
Doc/reference/compound_stmts.rst
Doc/reference/compound_stmts.rst
+7
-6
No files found.
Doc/reference/compound_stmts.rst
View file @
f04779b5
...
@@ -569,12 +569,13 @@ is equivalent to ::
...
@@ -569,12 +569,13 @@ is equivalent to ::
Foo = f1(arg)(f2(Foo))
Foo = f1(arg)(f2(Foo))
**Programmer's note:** Variables defined in the class definition are class
**Programmer's note:** Variables defined in the class definition are class
can be set in a method with ``self.name = value``. Both class and instance
variables; they are shared by instances. Instance variables can be set in a
variables are accessible through the notation "``self.name``", and an instance
method with ``self.name = value``. Both class and instance variables are
variable hides a class variable with the same name when accessed in this way.
accessible through the notation "``self.name``", and an instance variable hides
Class variables can be used as defaults for instance variables, but using
a class variable with the same name when accessed in this way. Class variables
mutable values there can lead to unexpected results. Descriptors can be used
can be used as defaults for instance variables, but using mutable values there
to create instance variables with different implementation details.
can lead to unexpected results. Descriptors can be used to create instance
variables with different implementation details.
.. XXX add link to descriptor docs above
.. XXX add link to descriptor docs above
...
...
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