if there is a return type of a method definition like java does

Rhodri James rhodri at wildebst.demon.co.uk
Mon Mar 30 01:01:09 CEST 2009


On Sat, 28 Mar 2009 03:11:20 -0000, Coonay <flankw at gmail.com> wrote:

> if there is a return type of a method definition,that would lead to
> faster decision to do with the method called,do you think so?

A method definition always returns a function object.  There.

Less facetiously, I don't see how knowing the return type of a
function or method affects decision speed in calling it at all.
I suppose it might allow some optimisation of subsequent
operations on the result, but given the dynamic typing nature
of Python I can't see that being worth the considerable effort.

-- 
Rhodri James *-* Wildebeeste Herder to the Masses



More information about the Python-list mailing list