Skip to content

Latest commit

 

History

History
44 lines (41 loc) · 1.59 KB

File metadata and controls

44 lines (41 loc) · 1.59 KB

Software Engineering with Python

Introduction to Object-Oriented Programming - Animal class in oop.py

  • Class syntax
  • The self parameter
  • Method syntax
  • Instance Variables
  • Inheritance
  • Class Variables
  • DRY (Don't Repeat Yourself)
  • The diamond problem

"Build a Library" lib.py, user.py, test_lib.py

  • Data Structures
  • "What is an API?"
  • Implement a data structure
  • Import and use the data structure in a cient module
  • Defensive programming
    • Raising Exceptions
    • Catching Exceptions
    • Custom Exceptions
  • The Python Data Model
    • "Dunder" protocol methods
      • __len__
      • __repr__
  • Writing tests
    • The unittest module
      • As an alternative to unittest, pytest is a popular third party library
    • Write tests for lib.py in test_lib.py
  • Code Documentation
    • We'll document our new libarary
    • Module docs
    • Class docs
    • Method docs
    • Code comments
  • Refactor
    • Add a base Sequence to factor out common functionality
    • Show the value of tests

Contribute to a shared code base

  • Git and version control
  • Maker sure tests pass
  • Branching
  • Pull requests and code review