Dan Stanzione (TACC) (original author), Steve Lantz, Adam Brazier, Chris Myers
Cornell Center for Advanced Computing

Revisions: 5/2024, 7/2021, 8/2016, 10/2014, 2/2014, 3/2013, 6/2010 (original)

Python is an object-oriented programming (OOP) language. In practice, this means a few different things. First, it provides support for working with objects, which are combinations of both data and functions that collectively represent useful data abstractions. Second, it provides support to enable programmers to define new classes of objects — that is, new datatypes — which can be useful in representing data in a particular application domain or algorithmic context. Almost everything in Python is an object, so it is useful to know how to both work with objects that have already been defined, and to define new objects. In this topic, we introduce some useful built-in classes of objects in Python, as well as programming language constructs supporting OOP more broadly.

Objectives

After you complete this segment, you should be able to:

  • Use common Python built-in classes
  • Create and use classes
  • Use inheritance in your own programs
Prerequisites

This workshop assumes the reader has no prior exposure to Python. A working knowledge of UNIX/Linux and general programming concepts is assumed. The target audience is scientists and engineers using high performance computing systems who wish to boost their productivity through the use of Python.

 
©   Cornell University  |  Center for Advanced Computing  |  Copyright Statement  |  Inclusivity Statement