Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.
/ oop Public archive

It includes Python Object Oriented Progamming tutorials and topics that you can apply it to develop software more effectively.

Notifications You must be signed in to change notification settings

Engr-Asad-Hussain/oop

Repository files navigation

Python Object Oriented Programming

This Python OOP explains to you the Python object-oriented programming clearly so that you can apply it to develop software more effectively.

By the end of this Python OOP module, you’ll have good knowledge of object-oriented principles. And you’ll know how to use Python syntax to create reliable and robust software applications.

What you’ll learn:

  • Create objects in Python by defining classes and methods.
  • Extend classes using inheritance.
  • SOLID principles in object-oriented programming.

Content

  • Section 1. Classes and objects
    • Object Oriented Programming – introduce to you the important concepts in Python object-oriented programming
    • Class – learn how to define a class and create new objects from the class
    • Class variables – explain the class variables (or attributes)
    • Instance methods – guide you on instance methods and help you understand the differences between a function and a method.
    • init method – show you how to use the init method to initialize object’s attributes.
    • Instance variables – understand the instance variables.
    • Class methods - understand the class methods.
    • Private attributes – learn about private attributes and how to use them effectively.
    • Class attributes – understand class attributes and more importantly when you should use class attributes.
    • Static methods – explain to you static methods and shows you how to use them to group related functions in a class.
  • Section 2. Special methods
    • str method – show you how to use the str dunder method to return the string representation of an object.
    • repr method – learn how to use the repr method and the main difference between str and repr methods.
    • eq method – learn how to define the equality logic for comparing objects by values.
    • bool method – guide you on how to determine whether a custom object is True or False using the bool method.
  • Section 3. Property
    • Property – show you how to use the property class to create a property.
    • @property decorator – learn how to use the @property decorator to create a property.
    • Read-only property – learn how to define read-only properties and use them for computed properties
    • Delete a property – guide you on how to delete a property from an object.
  • Section 4. Single inheritance
    • Inheritance – explain to you the inheritance concept and how to define a class that inherits from another class.
    • Overriding methods – show you how overriding methods work.
    • super – learn how to delegate to the methods of the parent class from a method in the child class
    • slots – use slots to make the class more memory efficient
    • Abstract class – learn what abstract classes are and how to define abstract classes
    • Protocol - use Python Protocol to define implicit interfaces.
  • Section 5. Enumeration
    • Enumeration – show you how to define a enumeration in Python.
    • Enum Aliases & @enum.unique – introduce to you the enum aliases and how to use the enum.unique decorator to ensure the uniqueness of member values.
    • Customize and extend enumerations – learn how to customize the behaviors of enum classes and how to extend the a custom enum class.
    • auto – use the enum auto class to generate unique values for enumeration’s members.
  • Section 7. Multiple inheritance
    • Multiple inheritance – learn how to implement multiple inheritance and understand how the method resolution order (MRO) works in Python.
    • Mixin – introduce to you the mixin concept and how to implement mixin in Python.
  • Section 8. Descriptors
  • Section 9. Metaprogramming
    • new – learn how Python uses the new method to create a new instance of a class.
    • dataclass – leverage dataclass to add special methods such as init and repr to custom classes.

About

It includes Python Object Oriented Progamming tutorials and topics that you can apply it to develop software more effectively.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages