This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: how to know that a module is a module, a function is a function ?
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.1
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: brian.curtin, py.user
Priority: normal Keywords:

Created on 2010-11-01 04:41 by py.user, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg120109 - (view) Author: py.user (py.user) * Date: 2010-11-01 04:41
>>> import os
>>> m = os
>>> type(m)
<class 'module'>
>>> isinstance(m, module)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'module' is not defined
>>> n = 1
>>> type(n)
<class 'int'>
>>> isinstance(1, int)
True
>>>
msg120110 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-11-01 04:45
See the "types" module, specifically types.ModuleType. Compare that to your "type(os)" result.

This is not a support channel. Please see python-list for these types of questions.
msg120186 - (view) Author: py.user (py.user) * Date: 2010-11-01 23:03
Ok, thanks, I thought this is some kind of a bug
History
Date User Action Args
2022-04-11 14:57:08adminsetgithub: 54484
2010-11-01 23:03:34py.usersetmessages: + msg120186
2010-11-01 04:45:51brian.curtinsetstatus: open -> closed

nosy: + brian.curtin
messages: + msg120110

resolution: rejected
stage: resolved
2010-11-01 04:41:34py.usercreate