Built-in Functions and Help Lesson: add get the methods attached to an object using the dir()
pageneck opened this issue · comments
Page commented
I am suggesting that you may consider adding to the lesson material under the subtopic below the dir(name_object) to get the methods attached to that object:
Functions attached to objects are called methods
Functions take another form that will be common in the pandas episodes.
Methods have parentheses like functions, but come after the variable.
Some methods are used for internal Python operations, and are marked with double underlines.
The dir() function returns all properties and methods of the specified object, without the values. This function will return all the properties and methods, even built-in properties which are default for all object.
Olav Vahtras commented
Thank you for your contribution! I agree that it is good to know about dir(). However, is a similar explanation in another episode (8), so I don't think it is required at this particular place.
Regards
Olav