On Thu, Feb 7, 2013 at 12:09 AM, Sunil Tech <[email protected]> wrote:
> If a method has no return type?
> what will it return?
>
note the original question is partially invalid... Python functions and
methods aren't typed. however, i imagine the OP really meant *return value*
instead, so the answer is really the following:
functions *and* methods with no explicit return *value* return None... this
happens when you either have no return statement or just return by itself
with no object given.
one exception is __init__()... you're never supposed to return anything
from it... ever. i can't think of any others... can you?
best regards,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"A computer never does what you want... only what you tell it."
+wesley chun : wescpy at gmail : @wescpy
Python training & consulting : http://CyberwebConsulting.com
"Core Python" books : http://CorePython.com
Python blog: http://wescpy.blogspot.com
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor