[Python-Dev] a strange case
Fred L. Drake, Jr.
fred@zope.com
Fri, 16 May 2003 14:49:38 -0400
I wrote:
> Here's a strange case we just ran across, led along by a typo in an
> import statement. This is using the head of the 2.2.x maintenance
> branch; I've not tested this against the trunk yet.
Ok, the trunk does a little better, but the error message is a little
confusing:
Python 2.3b1+ (#2, May 16 2003, 14:42:51)
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> class Foo(os):
... pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: function takes at most 2 arguments (3 given)
>>> class Foo(os, sys):
... pass
...
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: function takes at most 2 arguments (3 given)
-Fred
--
Fred L. Drake, Jr. <fred at zope.com>
PythonLabs at Zope Corporation