[Python-bugs-list] [ python-Bugs-475327 ] type() produces incorrect error msg

noreply@sourceforge.net noreply@sourceforge.net
Sat, 27 Oct 2001 12:38:37 -0700


Bugs item #475327, was opened at 2001-10-26 08:13
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=475327&group_id=5470

Category: Python Interpreter Core
Group: Python 2.2
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
>Assigned to: Tim Peters (tim_one)
Summary: type() produces incorrect error msg

Initial Comment:
type() takes 1 or 3 arguments, but the error msg is wrong:

>>> type(1)
<type 'int'>
>>> type('1', (), {})
<class '__main__.1'>
>>> type('1', ())
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: type() takes exactly 3 arguments (2 given)


----------------------------------------------------------------------

>Comment By: Tim Peters (tim_one)
Date: 2001-10-27 12:38

Message:
Logged In: YES 
user_id=31435

The msg in the example is now

TypeError: type() takes 1 or 3 arguments


Include/object.h; new revision: 2.98
Objects/typeobject.c; new revision: 2.114

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=475327&group_id=5470