[Tutor] What style do you call Python programming?
Steven D'Aprano
steve at pearwood.info
Fri Dec 9 16:55:48 CET 2011
Cranky Frankie wrote:
> I'm looking for a term to call the kind of Python programming that
> Python is, in other words, programming with no branching, no GOTOs, no
> statement labels and no line numbers. I'm tempted to call it
> Structured Progamming, but we had that in COBOL, and this is not like
> COBOL.
Python is a mixed paradigm language with a syntax which has been described as
"executable pseudo-code".
http://en.wikipedia.org/wiki/Programming_paradigm
As Python has no line numbers or statement labels, and forbids arbitrary
GOTOs, it is a structured language, like nearly all languages today. The main
unstructured language old-timers may be familiar with is early BASIC; younger
programmers may never have even seen an unstructured language.
Python allows the user to write code in a mix of procedural style (like
Fortran, Pascal or C), functional style (like Haskell) style, and
object-oriented style (like C++ or Java).
Unlike some other languages, Python encourages you to mix styles within a
single module, and use whatever works best for the specific fine-grained task.
--
Steven
More information about the Tutor
mailing list