At the moment modules are not supported in what2id (and in general). Probably we should check first if an object is a module and if so, raise NonSupported before jumping into further trouble.
Related, this is a funny case I just run into (notice that here whatami does have a what member):
python -c 'import whatami; whatami.what2id(whatami)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/whatever/lib/python2.7/site-packages/whatami/whatutils.py", line 37, in what2id
return obj.what().id()
TypeError: 'module' object is not callable
At the moment modules are not supported in what2id (and in general). Probably we should check first if an object is a module and if so, raise NonSupported before jumping into further trouble.
Related, this is a funny case I just run into (notice that here
whatamidoes have awhatmember):python -c 'import whatami; whatami.what2id(whatami)'