Skip to content

Latest commit

 

History

History
44 lines (40 loc) · 1.85 KB

File metadata and controls

44 lines (40 loc) · 1.85 KB

Python - More Classes and Objects

Learning Objectives

At the end of this project, you are expected to be able to explain to anyone, without the help of Google:

General

  • Why Python programming is awesome
  • What is OOP
  • “first-class everything”
  • What is a class
  • What is an object and an instance
  • What is the difference between a class and an object or instance
  • What is an attribute
  • What are and how to use public, protected and private attributes
  • What is self
  • What is a method
  • What is the special __init__ method and how to use it
  • What is Data Abstraction, Data Encapsulation, and Information Hiding
  • What is a property
  • What is the difference between an attribute and a property in Python
  • What is the Pythonic way to write getters and setters in Python
  • What are the special __str__ and __repr__ methods and how to use them
  • What is the difference between __str__ and __repr__
  • What is a class attribute
  • What is the difference between a object attribute and a class attribute
  • What is a class method
  • What is a static method
  • How to dynamically create arbitrary new attributes for existing instances of a class
  • How to bind attributes to object and classes
  • What is and what does contain __dict__ of a class and of an instance of a class
  • How does Python find the attributes of an object or class
  • How to use the getattr function

Requirements

General

  • Allowed editors: vi, vim, emacs
  • All your files will be interpreted/compiled on Ubuntu 20.04 LTS using python3 (version 3.8.5)
  • All your files should end with a new line
  • The first line of all your files should be exactly #!/usr/bin/python3
  • A README.md file, at the root of the folder of the project, is mandatory
  • Your code should use the pycodestyle (version 2.7.*)
  • All your files must be executable
  • The length of your files will be tested using wc