I have a method (I'll call it foo) that will either return None or an object depending on a random value generated. What I want to happen is that if I call foo(), i.e, f = foo() and it returns None, to re-call it until it returns something else. I would think this would be done with a while loop, but can't seem to get the details right.

Any help would be greatly appreciated.

Greg
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to