In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
In this issue, the editor will bring you about how to parse the Python__ double-underlined parameter code. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
The code is as follows
'' > Class1.__doc__ # type help information 'Class1 Doc.' > Class1.__name__ # type name' Class1' > Class1.__module__ # type module'_ _ main__' > base class inherited by the Class1.__bases__ # type (,) > Class1.__dict__ # type dictionary to store all type member information. > Class1 (). _ _ class__ # type > Class1 (). _ _ module__ # instance type module'_ _ main__' > Class1 (). _ _ dict__ # object dictionary, which stores all instance member information. Class Ren (object):''ok,it's crazy''' name =' a human being' @ staticmethod def look (): return "ok" class Men (Ren): sex = "male" class Women (Ren): sex = "female" class Baby (Women): sex = "children" if _ name__ = "_ main__": r = Men () print (Ren.__dict__, "_ dict__") print (Ren.__doc__) "_ doc__") print (Men.__doc__, "_ doc__") print (Ren.__bases__, "_ bases__") print (Baby.__bases__ [0]. _ bases__, "_ bases__") print (Baby.__bases__ [0]. _ dict__, "_ dict__") print (Baby.__dict__ "_ _ dict__") print (Men.__bases__ [0] (), "_ _ bases__") print (Men.__name__, "_ _ name__") print (r.roomproof classrooms _ (), "_ _ class__") print (r.creative modulematching, "_ _ class__") print (Men.__module__, "_ _ class__") print (_ _ file__)
Result
{'_ module__':'_ main__','_ doc__': "ok,it's crazy", 'name':' a human being', 'look':,' _ _ dict__':,'_ _ weakref__':} _ _ dict__ok,it's crazy _ _ doc__None _ doc__ (,) _ bases__ ( ) _ _ bases__ {'_ module__':'_ _ main__', 'sex':' female','_ _ doc__': None} _ _ dict__ {'_ _ module__':'_ _ main__', 'sex':' children' '_ _ doc__': None} _ _ dict__ bases__Men _ _ name__ class____main__ class____main__ class__D:/Projects/MxShop/tester.py
The above is the editor for you to share how to parse the Python__ double-dashed parameter code, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.