File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def test_class_objects():
17
17
18
18
# ATTRIBUTE REFERENCES use the standard syntax used for all attribute references in
19
19
# Python: obj.name. Valid attribute names are all the names that were in the class’s namespace
20
- # when the class object was created. For class MyCounter the following references are valid
20
+ # when the class object was created. For class ComplexNumber the following references are valid
21
21
# attribute references:
22
22
23
23
class ComplexNumber :
@@ -52,9 +52,9 @@ def get_imaginary(self):
52
52
assert complex_number .real == 10
53
53
assert complex_number .get_real () == 10
54
54
55
- # Let's change counter default value back.
56
- ComplexNumber .real = 10
57
- assert ComplexNumber .real == 10
55
+ # Let's change complex number default value back.
56
+ ComplexNumber .real = 0
57
+ assert ComplexNumber .real == 0
58
58
59
59
# The instantiation operation (“calling” a class object) creates an empty object. Many classes
60
60
# like to create objects with instances customized to a specific initial state. Therefore a
You can’t perform that action at this time.
0 commit comments