The Python glossary defines a function as:
A series of statements which returns some value to a caller. It can also be passed zero or more arguments which may be used in the execution of the body.
A class can be passed arguments, and returns a value to the caller, so arguably by this definition classes are functions*.
In addition (as deceze points out in the comments), a class should always return an instance of itself – set
, property
, slice
, etc. all return instances of set
, property
, slice
, etc. respectively – so set
, property
and friends are all also classes, and so they are documented as such:
class set([iterable])
meaning that set
is a class, not that it returns one.
I would guess that set
etc. are documented in the "built-in functions" page because a) they are callable, and b) it's convenient to have all the documentation for "things you can call" in one place.
*Strictly speaking, isinstance(C, types.FunctionType)
is false for any class C
(as far as I can tell), but classes are certainly callables (isinstance(C, typing.Callable)
is true), which is maybe a more useful property to think about.