On Tue, Sep 22, 2020 at 11:13:50AM +0200, Agnese Camellini wrote: > I mean do i have a keyword to obtain all the methods and the > attributes of > a class in python?
In addition to the `dir()` that others have mentioned, I'll add that developing interactively is very common, especially in ipython/jupyter sessions or notebooks. With these, you have tab completion or question mark documentation. For example, if you have an instance `myobj` of the class `MyClass`, then in an ipython session, typing `myobj.<tab>` will open up a list of all the methods for objects of `MyClass`. And given an object or funcation, appending `?` will bring up the documentation (as given in the docstring) for that object or function. This is true even for user-defined functions and objects, even if they were defined during the same interactive session. Good luck! -- David Lowry-Duda <[email protected]> <davidlowryduda.com> -- https://mail.python.org/mailman/listinfo/python-list
