If you want all (including private) attributes, just
dir(Myclass)
Attributes starting with _are private / internal. For example, even your simple one Myclasswill have __module__an empty attribute __doc__. To filter them, use
filter(lambda aname: not aname.startswith('_'), dir(Myclass))
source
share