Scott Meup wrote: > I'm trying tolearn Python. The documentation tells syntax, and other > things > about a command. But for too many commands, it doesn't tell what it does. > for instance, in VB the 'return' command tells the program what line to > execute after some event (usually an error). In Python it appears to > return > a value. Where does it return it to? I couldn't find anywhere on the > Python website to find out or to ask Python to upgrade their > documentation. Can somebody please recommend a source.
Python's return has nothing to do with with gosub ... return in Basic. I believe the analog to Python's return <some-value> in VB is <function-name> = <some-value> exit function I. e. Function f(a, b) If a > b Then f = 42 Exit Function End If f = a + b End Function translates to def f(a, b): if a > b: return 42 return a + b in Python. -- http://mail.python.org/mailman/listinfo/python-list