Skip to content

Commit ebe6d25

Browse files
authored
Explain attributes more
1 parent 64cb9e6 commit ebe6d25

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

classes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ True
128128

129129
`url`, `founding_year` and `free_to_use` are not variables, they are
130130
**attributes**. More specifically, they are **instance attributes**.
131+
The biggest difference is that variables are accessed by their name,
132+
and attributes are accessed by typing a name of an object (like
133+
stackoverflow), then a dot and then the name of the attribute.
131134

132135
If we make another Website, does it have the same `url`, `founding_year`
133136
and `free_to_use`?

0 commit comments

Comments
 (0)