[Python-Dev] Uninformative error message about subclassing
Aahz
aahz at pythoncraft.com
Mon May 31 21:17:55 EDT 2004
On Mon, May 31, 2004, Edward C. Jones wrote:
>
> ----
> a.py:
>
> class A(object):
> pass
>
> ----
> b.py:
>
> import a
>
> class B(a):
> pass
> ----
> If I run "python b.py" I get the uninformative error message:
>
> Traceback (most recent call last):
> File "./b.py", line 5, in ?
> class B(a):
> TypeError: function takes at most 2 arguments (3 given)
>
> I think the message should say that "a" is not a class.
Please file a bug report on SF. However, I suspect this will be tricky
to solve (if it's even possible), because of the way builtin objects are
now part of new-style classes. (That A is a new-style class is
irrelevant.)
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"as long as we like the same operating system, things are cool." --piranha
More information about the Python-Dev
mailing list