Section 13.1 Object-oriented Programming
A programming paradigm is a “way to classify programming languages based on their patterns of writing code”. Up to now, most of the programs we have been writing use a procedural programming paradigm. In procedural programming, the focus is on writing functions or procedures which operate on data.
1
http://en.wikipedia.org/wiki/Programming_paradigm
2
http://en.wikipedia.org/wiki/Procedural_programming
Another major paradigm is object-oriented programming (OOP). In object-oriented programming, the focus is on the creation of objects which contain both data and functionality together. Usually, each object definition corresponds to some object or concept in the real world and the functions that operate on that object correspond to the ways real-world objects interact.
3
http://en.wikipedia.org/wiki/Object-oriented_programming
Object-oriented programming has its roots in the 1960s, but it wasn’t until the mid 1980s that it became the main programming paradigm used in the creation of new software. It was developed as a way to handle the rapidly increasing size and complexity of software systems and to make it easier to modify these large and complex systems over time.
Python is an object-oriented programming language. That means it provides features that support object-oriented programming, and this chapter will introduce you to some of Python’s fundamental OOP concepts.