Subroutine Equivalent in Python (newbie Q)

Greg Jorgensen gregj at pobox.com
Thu Feb 1 14:24:55 EST 2001


Python has functions, modules, and packages, which support modular
programming at various levels. Python also has classes, which support
object-oriented programming. I strongly urge you to read the excellent
Python tutorial at www.python.org.


In article <95cbr2$4o2$1 at nnrp1.deja.com>,
  binnc at my-deja.com wrote:
> Hello,
>
> Another question from someone totally new to
> Python. Is there an equivalent in Python to a sub-
> routine, (e.g. gosub and return).  I want to
> create a modular program with sub-routines to
> perform distinct tasks wihin the program for
> organizational and debugging purposes, etc.  Is
> the only (or best) way to do this is with
> modules?  A function works but the values
> obtained within the function do not appear to be
> valid outside of that function.  I guess I am
> looking for the best approach to create the
> subroutines for execution from the main flow of
> the program.
>
> Thanks for any assistance!
>
> Sent via Deja.com
> http://www.deja.com/
>

--
Greg Jorgensen
Portland, Oregon, USA
gregj at pobox.com


Sent via Deja.com
http://www.deja.com/



More information about the Python-list mailing list