Tools, FAQ, Tutorials:
Modules Are Objects Too
Are modules objects in Python?
✍: FYIcenter.com
Yes, all modules are objects of "module" type in Python?
You can verify this with the following Python code:
>>> import firstModule >>> type(firstModule) <class 'module'>
In other words, the "import firstModule" statement performed two activities:
Like any other types of objects, you can use the "dir()" to list its members:
>>> import firstModule >>> dir(firstModule) ['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', 'Python Tutorials', '__package__', '__spec__', '1.00', 'firstClass', 'sayHello']
⇐ 'import' Module Loading Statement
2022-08-26, ∼1694🔥, 0💬
Popular Posts:
How to use the "@(...)" expression in Azure API Policy? The "@(...)" expression in Azure API Policy ...
How To Read the Entire File into a Single String in PHP? If you have a file, and you want to read th...
What is test testing area for? The testing area is provided to allow visitors to post testing commen...
How to decode the id_token value received from Google OpenID Connect authentication response? Accord...
Where to find tutorials on Using Azure API Management Publisher Dashboard? Here is a list of tutoria...