Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f04779b

Browse files
committed
#3229 fix typo and expand notes a little
1 parent ed25b2c commit f04779b

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

Doc/reference/compound_stmts.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -569,12 +569,13 @@ is equivalent to ::
569569
Foo = f1(arg)(f2(Foo))
570570

571571
**Programmer's note:** Variables defined in the class definition are class
572-
can be set in a method with ``self.name = value``. Both class and instance
573-
variables are accessible through the notation "``self.name``", and an instance
574-
variable hides a class variable with the same name when accessed in this way.
575-
Class variables can be used as defaults for instance variables, but using
576-
mutable values there can lead to unexpected results. Descriptors can be used
577-
to create instance variables with different implementation details.
572+
variables; they are shared by instances. Instance variables can be set in a
573+
method with ``self.name = value``. Both class and instance variables are
574+
accessible through the notation "``self.name``", and an instance variable hides
575+
a class variable with the same name when accessed in this way. Class variables
576+
can be used as defaults for instance variables, but using mutable values there
577+
can lead to unexpected results. Descriptors can be used to create instance
578+
variables with different implementation details.
578579

579580
.. XXX add link to descriptor docs above
580581

0 commit comments

Comments
 (0)