cleaner way to write this?

John Salerno johnjsal at NOSPAMgmail.com
Thu Oct 26 17:03:58 CEST 2006


Paul Rubin wrote:
> Bruno Desthuilliers <bdesth.quelquechose at free.quelquepart.fr> writes:
>>> But if the user doesn't enter any text, I don't want the method to
>>> return at all (even None).
>> John, please re-read the FineManual(tm). None is the default return
>> value of a function - even if there's no return statement.
> 
> Correct, but if the user doesn't enter text, the function is supposed
> to loop and prompt for text again, instead of returning.

Yes, that's what I meant. I didn't want it to return *yet* until a value 
was entered.



More information about the Python-list mailing list