[issue10275] how to know that a module is a module, a function is a function ?

2010-11-01 Thread py.user
py.user added the comment: Ok, thanks, I thought this is some kind of a bug -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue10275] how to know that a module is a module, a function is a function ?

2010-10-31 Thread Brian Curtin
Brian Curtin added the comment: 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. -- nosy: +brian.curtin resolution: -> rejected stage: -> committed/reje

[issue10275] how to know that a module is a module, a function is a function ?

2010-10-31 Thread py.user
New submission from py.user : >>> import os >>> m = os >>> type(m) >>> isinstance(m, module) Traceback (most recent call last): File "", line 1, in NameError: name 'module' is not defined >>> n = 1 >>> type(n) >>> isinstance(1, int) True >>> -- components: Interpreter Core messages: