On Apr 13, 10:14 am, [EMAIL PROTECTED] wrote:
> what is the
> meaning of 'None'?
>
It's a value just like any other python value: 2, 7.5, "red", and it
evaluates to false in a conditional:
my_var = None
if not my_var:
print "bad data"
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 13, 10:14 am, [EMAIL PROTECTED] wrote:
> I have a confusion when I do some practice, the code and output are as
> following,
>
> >>> def fun():
>
> print 'In fun()'
>
> >>> testfun = fun()
> In fun()
> >>> print testfun
> None
> >>> testfun2 = fun
> >>> print testfun2
>
> >>>
[EMAIL PROTECTED] a écrit :
> I have a confusion when I do some practice, the code and output are as
> following,
>
def fun():
> print 'In fun()'
Function fun doesn't explicitelly return something, so it's return value
defaults to None (nb: None is a builtin object representing 'no
On Apr 13, 6:14 pm, [EMAIL PROTECTED] wrote:
> I have a confusion when I do some practice, the code and output are as
> following,
>
> >>> def fun():
>
> print 'In fun()'
>
> >>> testfun = fun()
> In fun()
> >>> print testfun
> None
> >>> testfun2 = fun
> >>> print testfun2
>
>
> >
[EMAIL PROTECTED] wrote:
> I have a confusion when I do some practice, the code and output are as
> following,
>
def fun():
> print 'In fun()'
>
>
testfun = fun()
> In fun()
print testfun
> None
testfun2 = fun
print testfun2
>
print testfun2()
> In fu
I have a confusion when I do some practice, the code and output are as
following,
>>> def fun():
print 'In fun()'
>>> testfun = fun()
In fun()
>>> print testfun
None
>>> testfun2 = fun
>>> print testfun2
>>> print testfun2()
In fun()
None
>>>
what is 'testfun'? Why it is 'N