+ 3
Why "none" is print while calling the function?and what is the need of none?
5 odpowiedzi
+ 7
In python, if function has no return, it will return None
+ 4
none is like nil(Lua) like NULL(C++), its basically a no value.
+ 4
All functions "pop something from the call stack" on return, whether you use that value or not.
Since the activity of "a value MUST be returned" is deeply implemented in computer science, a generic value MUST act as placeholder when you don't provide one.
+ 2
None needed to express the abstain of something
e.g.
if var = None:
statement
+ 1
Because "some_func()" has no value ...