[Python-Dev] Re: Documentation: type-vs.-function

Fred L. Drake, Jr. fdrake@acm.org
Mon, 30 Sep 2002 10:58:03 -0400

David Abrahams writes:
 > Does this distinction matter? A little, I think. Calling it a function
 > makes it sound like we're living in the past. Same goes for str, type,
 > list, tuple, et. al. I realize that the type (especially <type 'type'>)
 > acts like a function under many circumstances...

It definately matters.

Alex Martelli writes:
 > It's important, when feasible, to clarify what built-ins are types
 > -- a type has MORE functionality than a function, after all (in
 > particular, one can subclass it, while one can't subclass a
 > function).

I agree.

The current somewhat-vague plan is to add a new section parallel to
the section on built-in functions that lists the built-in types
exposed in the __builtin__ module.  This would make it easier to
describe these types and their ability to be subclassed in a more
rational manner than in their current location.  Placeholder entries
will be maintained for the function entries so people accustomed to
looking in the current location won't be completely lost.


Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation