[Python-bugs-list] [ python-Bugs-463737 ] types.CallableIterType

noreply@sourceforge.net noreply@sourceforge.net
Tue, 25 Sep 2001 06:43:36 -0700


Bugs item #463737, was opened at 2001-09-21 21:21
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=463737&group_id=5470

Category: Python Library
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Barry Warsaw (bwarsaw)
Assigned to: Guido van Rossum (gvanrossum)
Summary: types.CallableIterType

Initial Comment:
The types module defines a FunctionIterType, however
iterators of this type have a repr that describes them
as  <type 'callable-iterator'>.  Instances of this type
return true for isinstance(it, FunctionIterType).

I think types.FunctionIterType should be changed to
CallableIterType since 1) this more accurately
describes the type of iterator they are; 2) more
closely matches what you see in the object's repr.

Since this is related: None of the *IterType in the
types module are documented.  My recommendation is to
address the point above first, then reassign to Fred
for documentation.

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

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-25 06:43

Message:
Logged In: YES 
user_id=6380

Assigned to Tim -- another set of brains might help here.
:-)

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-22 09:56

Message:
Logged In: YES 
user_id=6380

None of the new stuff is documented.  I have a TO DO item
for that myself.

If you're doing type tests on callable-iterator instances
something's wrong anyway; I suggest to remove the
FunctionIterType. (Not all the new types have been added to
types, and I'm not sure that they should be.)

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

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