15.04.2013 Views

Core Python Programming (2nd Edition)

Core Python Programming (2nd Edition)

Core Python Programming (2nd Edition)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Stated Number of Objects to Return Type of Object That <strong>Python</strong> Returns<br />

0<br />

1<br />

>1<br />

None<br />

object<br />

tuple<br />

Many languages that support functions maintain the notion that a function's type is the type of its return<br />

value. In <strong>Python</strong>, no direct type correlation can be made since <strong>Python</strong> is dynamically typed and functions<br />

can return values of different types. Because overloading is not a feature, the programmer can use the<br />

type() built-in function as a proxy for multiple declarations with different signatures (multiple prototypes<br />

of the same overloaded function that differ based on its arguments).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!