π― Welcome Message
This is a Python Object Oriented Programming (OOP) learning Knowledge Base that covers content from beginner-level basics to advanced practical practice, which includes a full range of contents such as core features of classes and objects, exception handling, data structures, function interfaces, and string operations, helping you systematically master the ideas and practical skills of Python Object Oriented Programming.
β¨ Vision and Objectives
- Create the most beginner-friendly learning path for Python Object Oriented programming
- From Theory to Practice: Deepen Understanding Through Code Examples and Project Cases
- Build a reusable knowledge system to support the development of subsequent complex projects
π Core Content Modules (Table Version)
| Module Name | Included chapters |
|---|---|
| Getting started | - Introduction to object-oriented design methods - Basic concepts of object-oriented programming |
| Core implementation of classes and objects | - Creating classes with Python- Adding attributes to custom classes- Adding methods to custom classes- PyCharm code tag tips- Data encapsulation in custom classes- Improving readability with type annotations - @property decorator: wrapping methods as attributes- Relationships between classes- Inheritance and the Liskov substitution principle - Calling parent class methods from a subclass - Outputting logs with the logging module - Installing and using SourceTrail - Static methods and class methods- __slots__ magic method - Polymorphism, method overriding, and the open-closed principle - Duck typing and "file-like object" - Multiple inheritance and plotting with PyQtGraph - PyCharm auto-generated comments - Implementing composition and saving to CSV - Multi-file organization: module and package |
| Exceptions and debugging | - Exceptions and syntax errors - Raising exceptions - Exception handling: try/except statements - Checking the input data type - Context managers and the with statement - Exception hierarchy and custom exceptions - Python programming principles and conventions - Assertions and defensive programming |
| Data Types and Structures | - Python built-in data types: the object root class - Object and Type - Class and Instance - The relationship between Object, Type and Class - Common compound types: tuples and named tuples - Strings and the __doc__ attribute - Dictionaries - Lists and list comprehensions - Implementing stacks, queues and deques with lists - Sets - Enumerations and the enum module - Queues (FIFO, LIFO, priority queues) - collections container data types - Extending built-in data types - Overriding the magic methods of built-in types - Common data structures: linked lists, trees, hash tables |
| Functions and Interfaces | - Functions and event-driven frameworks - Callback functions - Positional, default, variable-length and keyword arguments - Differences between functions and methods, and lambda anonymous functions - Interfaces and abstract base classes - Implementing interfaces with Zope - Protocols and interfaces |
| Strings and Serialization | - Strings and character encoding - String formatting and the format method - Byte sequence types and mutable byte strings - Regular expressions and the re module - Serialization and deserialization - Definition and implementation of serializing Web objects |
| Advanced Practice | - Parallelism and concurrency: threads and processes - Comprehensive object-oriented example: real-time sensor data plotter |