[docs] Function return types

Sandro Tosi sandro.tosi at gmail.com
Fri Aug 12 19:19:17 CEST 2011

Hello Sven,
thanks for your email.

On Thu, Jun 2, 2011 at 21:50, Sven Brauch <svenbrauch at googlemail.com> wrote:
> Hi there!
> I noticed there's no standard way on docs.python.org in which return
> types of functions are specified. Sometimes the return type can be
> read out of the description, sometimes it can't; but there's no easy
> way to see what kind of data a function is likely to return. What do
> you think about adding such an attribute? I'd be happy to help adding
> those where it seems necessary.

Python is a dynamic typing language, so it doesn't have the concept of
"function return type" (a-la C or Java, where you define in your code
what's the type that function will return), but it's the behavior of
the returned object that defines what it is (duck typing)

I'm sure you can find a lot of material on the web about it, but
there's nothing to be fixed in the doc.

Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

More information about the docs mailing list