>>> MYClass . __name__\r\n' MYClass '<\/pre>\n__module__
\nThis attribute give the module name.in which the class was defined.<\/p>\n
>>> MYClass . ___module___\r\n' ___main___ '<\/pre>\n___dict___
\nA class has a namespace implemented by a dictionary object. Class attribute references are translated to lookups in this dictionary, e.g., MyClass . i is translated to MyClass .___dict___ [ ” i ” ].<\/p>\n
>>> MyClass.___dict___\r\n{ ' i ' : 12345 , '___module___' : '___main___ ' , '___doc___ ': ' A simple example class ' , ' f ' : <function f at 0x0640A070>}<\/pre>\n___bases___
\nThis attribute give the tuple (possibly empty or a singleton) containing the base classes.<\/p>\n
>>> MyClass.___bases___.\r\n( )<\/pre>\n___doc___
\nThis attribute give the class documentation string, or None, if not defined.<\/p>\n
>>> MyClass.___doc___ \r\n' A simple example class '<\/pre>\nClass instance object<\/strong>
\nSome pre-defined attributes of class instance object are:<\/p>\n___dict___
\nThis give attribute dictionary of class instance.<\/p>\n
>>> x. ___dict___ \r\n{ }<\/pre>\n___class___
\nThis give the instance’s class.<\/p>\n
>>> x. ___class____ \r\n<class ___main___ .MyClass at 0x063DA880><\/pre>\n","protected":false},"excerpt":{"rendered":"In this Page, We are Providing Python Programming – Pre-Defined Attributes. Students can visit for more Detail and Explanation of Python Handwritten Notes\u00a0Pdf. Python Programming – Pre-Defined Attributes Pre-defined attributes Class and class instance objects has some pre-defined attributes: Class object Some pre-defined attributes of class object are: __name__ This attribute give the class name. …<\/p>\n
Python Programming – Pre-Defined Attributes<\/span> Read More »<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[5],"tags":[],"yoast_head":"\nPython Programming - Pre-Defined Attributes - Python Programs<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n