Book Image

Sage Beginner's Guide

By : Craig Finch
1 (1)
Book Image

Sage Beginner's Guide

1 (1)
By: Craig Finch

Overview of this book

Table of Contents (17 chapters)
Sage Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Object-oriented programming


An object is a construct that contains data and has methods that operate on its data. A class defines how data is stored in an object, and what methods are available to work with the data. A class is like a blueprint that describes how a house is to be built. An object is like a house that is constructed from the blueprint. Many houses can be constructed from the same blueprint. Although the houses are built from the same plans and have the same structure, each house is an independent entity, and the contents of each house can be different. In Python, an object is known as an instance of a class. If you're new to object-oriented programming, a good starting point is to use objects as models of concrete objects in the real world. Once you've become familiar with the concept, you can use objects to represent all kinds of concepts. For more information about the general principles of object-oriented programming, read http://en.wikipedia.org/wiki/Object-oriented_programming...