Skip to content

p-chambers/Python_OOP_Workshop

Repository files navigation

Python Object Orientation course

Material in this repository is created for the purpose of teaching the concepts of object orientation using Python. It forms the material of a short course delivered at the University of Southampton's Doctoral Festival, and is also used in the NGCM Summer Academy Basics B Material.

The concepts of OOP are often covered lightly in undergraduate and basics courses, however large amounts of scientific Python packages are written in an object oriented manner. The skills learned in this workshop should therefore enable scientists to write (and more importantly, read) the packages they are using, and also serve as a starting platform for those wanting to learn more advanced OOP languages such as C++ or Java.

The following topics will be covered in the context of OOP in Python:

  • Classes
  • Python 2.X vs 3.X
  • Initialization and init
  • self
  • Encapsulation
  • Inheritance
  • Magic operators

Prior knowledge of programming in Python is assumed, including e.g. lists, for loops, conditionals, numpy and matplotlib. See here for useful reference.

Getting Started

Teaching material is largely in Jupyter Notebook format, and can be followed by either:

  1. Cloning this repository with

git clone https://github.com/p-chambers/Python_OOP_Workshop.git

and viewing the 'index.ipynb' as a jupyter notebook with

jupyter notebook index.ipynb

You should also remove output with

Kernel > Restart > Clear all outputs and restart

  1. Viewing static material at nbviewer

Authors

Paul Chambers

Demonstrators

Ioannis Begleris, Jonathon Waters

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published