Skip to content

Commit 4258e16

Browse files
committed
be explicit
1 parent e4f0cce commit 4258e16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

classes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ Methods are "links" to the class attribute functions. So
274274
and when `stackoverflow.info()` is called it automatically gets
275275
`stackoverflow` as an argument.
276276

277-
In other words, `Class.method(instance)` does the same thing as
278-
`instance.method()`. This also works with built-in classes, for
277+
In other words, **`Class.method(instance)` does the same thing as
278+
`instance.method()`**. This also works with built-in classes, for
279279
example `'hello'.lower()` is same as `str.lower('hello')`.
280280

281281
## Defining methods when defining the class
@@ -286,7 +286,7 @@ it later?
286286
```py
287287
>>> class Website:
288288
...
289-
... def info(self): # self is a Website instance
289+
... def info(self): # self will be stackoverflow
290290
... print("URL:", self.url)
291291
... print("Founding year:", self.founding_year)
292292
... print("Free to use:", self.free_to_use)

0 commit comments

Comments
 (0)