Re: [Tutor] No return statement

2007-04-24 Thread Alan Gauld
"Cecilia Alm" <[EMAIL PROTECTED]> wrote > functions which lack a return statement ('procedures') actually > return "None". > For such functions, I assume it's preferred to not catch "None" in a > variable. You can catch it if you like, but since functions with no return *always* return None the

Re: [Tutor] No return statement

2007-04-24 Thread Cecilia Alm
OK, that's my opinion too. Thanks! 2007/4/24, Andre Engels <[EMAIL PROTECTED]>: > My opinion is that one should not create or set a variable if its > value is not used. In the case mentioned, you know what the return > value will be, so there seems to be no reason to keep it. > > 2007/4/24, Cecil

Re: [Tutor] No return statement

2007-04-24 Thread Andre Engels
My opinion is that one should not create or set a variable if its value is not used. In the case mentioned, you know what the return value will be, so there seems to be no reason to keep it. 2007/4/24, Cecilia Alm <[EMAIL PROTECTED]>: > My apologies for asking a trivial question about programming

[Tutor] No return statement

2007-04-24 Thread Cecilia Alm
My apologies for asking a trivial question about programming practice. As mentioned in the online tutorial (http://docs.python.org/tut/node6.html#SECTION00670), functions which lack a return statement ('procedures') actually return "None". For such functions, I assume it's preferre