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, ∼2588🔥, 0💬
Popular Posts:
Where to find tutorials on OpenID? Here is a large collection of tutorials to answer many frequently...
How To Set session.gc_divisor Properly in PHP? As you know that session.gc_divisor is the frequency ...
What validation keywords I can use in JSON Schema to specifically validate JSON Array values? The cu...
How to use "link" command tool to link objet files? If you have object files previously compiled by ...
How to create a new API on the Publisher Dashboard of an Azure API Management Service? If you are ne...