Thank you Wesley, Kal tutor
On Thu, Feb 7, 2013 at 12:07 PM, Kal Sze swordan...@gmail.com wrote:
Dear Sunil,
No method or function in Python has a *static* return type. That's
because Python is by nature a dynamic language, with duck typing and
dynamic dispatch. In fact, any method or
On 07/02/13 17:32, wesley chun wrote:
On Thu, Feb 7, 2013 at 12:09 AM, Sunil Techsunil.tech...@gmail.com 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
Op 07-02-13 10:09, Sunil Tech schreef:
Thank you Wesley, Kal tutor
In the future, the Python interpreter comes in handy for quick checks.
def spam():
... pass
...
s = spam()
s, repr(s), type(s)
(None, 'None', type 'NoneType')
Timo
On Thu, Feb 7, 2013 at 12:07 PM, Kal Sze
If a method has no return type?
what will it return?
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
On Thu, Feb 7, 2013 at 12:09 AM, Sunil Tech sunil.tech...@gmail.com 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
Dear Sunil,
No method or function in Python has a *static* return type. That's
because Python is by nature a dynamic language, with duck typing and
dynamic dispatch. In fact, any method or function may well return any
of a number of different types:
def crazy_function(return_int)
if