Skip to content

Commit 7d5378e

Browse files
authored
Update classes.md
1 parent 6a34112 commit 7d5378e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

classes.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ But is `stackoverflow.info` the same thing as `Website.info`?
237237

238238
It's not.
239239

240-
Instead, `stackoverflow.info` is a **method**. Effbot also has a `.info`
241-
method. So `Website.info(stackoverflow)` does the same thing as
242-
`stackoverflow.info()`, and when `stackoverflow.info()` is called it
243-
automatically gets `stackoverflow` as an argument.
240+
Instead, `stackoverflow.info` is a **method**. Functions as class
241+
attributes can be accessed as methods from instances. Effbot also
242+
has a `.info` method. So `Website.info(stackoverflow)` does the same
243+
thing as `stackoverflow.info()`, and when `stackoverflow.info()` is
244+
called it automatically gets `stackoverflow` as an argument.
244245

245246
In other words, `Class.method(instance)` does the same thing as
246247
`instance.method()`. This also works with built-in classes, for

0 commit comments

Comments
 (0)