Python: Classes and Modules

Python: Classes and Modules

Updated Oct 17, 2019

Course Overview

Python is a lot more than a scripting language, and can be used to create OOP applications using classes, or using a functional paradigm. This course covers some of the ways Python programs can execute. You'll learn about building your own custom functions and classes, and documentation and file handling.

Target Audience

Beginner Python developers, and developers with experience in other languages looking to start programming in Python

Learning Objectives

  • create and import a module at the Python REPL
  • define a function in Python
  • describe the difference in operation between Python scripts, programs and modules
  • run a module as a script using the __name__ == __main__ syntax in Python
  • create a main function that takes command line arguments in Python
  • describe the relationship between classes and types in Python
  • create a class definition and describe the structure in Python
  • write a class initializer method in Python
  • write and use class instance methods in Python
  • write and use static methods in Python
  • use inheritance and describe the semantics in Python
  • describe class properties in Python
  • describe how inheritance affects properties in Python
  • write a class that implements operator overloading in Python
  • write docstrings in Python
  • write comments in Python
  • describe best practice for documenting Python code as set out in PEP 8
  • read text files in Python
  • write data in Python
  • write large files in Python
  • read binary data in Python
  • write binary data in Python
  • write a Python class to represent a vector