Guido van Rossum added the comment:
I don't see an issue to be fixed here; adding special tests in order to
provide more detailed error messages is rarely a good idea.
Also, PEP 8 has said for years now that modules should *not* be named
the same as classes. Yes, there are a few such modules in
Christian Heimes added the comment:
I agree. Python can't stop the developer from doing stupid things. We
could remove Py_TPFLAGS_BASETYPE from the module type but that could
cause incompatibilities with existing code.
I'm assigning the bug to our beloved dictator to ask for his opinion.
--
Georg Brandl added the comment:
In 2.5, the message says "module.__init__() takes at most 2 arguments (3
given)", which is at least a bit more specific.
You get similar errors when "deriving" from other arbitrary objects, so
I don't know if a special case makes sense here.
--
nosy: +gbr