Python objects with special methods – Create better classes!
Python objects with special methods – Create better classes!, available at $49.99, has an average rating of 4.9, with 23 lectures, based on 39 reviews, and has 410 subscribers.
You will learn about Explain the origin of the names Python datamodel, magic methods, dunder methods and special methods. Write an indexer to support subscripting with the __getitem__ method Make objects callable with __call__ Define the object identity Apply __iter__, __next__ to make your objects iterable Specify object equality with __eq__, __ne__, __lt__, __gt__, __le__, __ge__ Wrap existing code into context managers with __enter__ and __exit__ Describe how objects are constructed by methods __new__ and __init__ This course is ideal for individuals who are Python programmers who want understand Python better or Python programmers who want to understand how language features like built-in functions and operators map to special methods in classes It is particularly useful for Python programmers who want understand Python better or Python programmers who want to understand how language features like built-in functions and operators map to special methods in classes.
Enroll now: Python objects with special methods – Create better classes!
Summary
Title: Python objects with special methods – Create better classes!
Price: $49.99
Average Rating: 4.9
Number of Lectures: 23
Number of Published Lectures: 23
Number of Curriculum Items: 23
Number of Published Curriculum Objects: 23
Original Price: $29.99
Quality Status: approved
Status: Live
What You Will Learn
- Explain the origin of the names Python datamodel, magic methods, dunder methods and special methods.
- Write an indexer to support subscripting with the __getitem__ method
- Make objects callable with __call__
- Define the object identity
- Apply __iter__, __next__ to make your objects iterable
- Specify object equality with __eq__, __ne__, __lt__, __gt__, __le__, __ge__
- Wrap existing code into context managers with __enter__ and __exit__
- Describe how objects are constructed by methods __new__ and __init__
Who Should Attend
- Python programmers who want understand Python better
- Python programmers who want to understand how language features like built-in functions and operators map to special methods in classes
Target Audiences
- Python programmers who want understand Python better
- Python programmers who want to understand how language features like built-in functions and operators map to special methods in classes
People say that python is an intuitive language to learn and use. Beginners write their first programs in no time and more advanced programmers make educated guesses how to use parts of Python they have never used before. Even third-party libraries seem to work exactly how you expected.
80% of our time we are using operators like +-/* to calculate, use for-loops to go through lists, use len() to count and indexers to access elements from lists. After a while you don’t even have to think about these language features anymore. You just use them and expect things to work the same way everywhere.
But why and how does this work?
In this course, you learn how to design your classes and objects to support common language features so other programmers can make smart guesses about how to use them. You learn how to support iteration, subscripting (indexing), context managers, hashing, equality checking etc.
After this course, you are able to:
– Explain the origin of the names Python datamodel, magic methods, dunder methods and special methods.
– Write an indexer to support subscripting with the __getitem__ method
– Apply __iter__, __next__ to make your objects iterable
– Define the object identity
– Use __hash__ to make objects hashable
– Specify language featureswith special methods __eq__, __ne__, __lt__, __gt__, __le__, __ge__
– Make objects callable with __call__
– Describe how objects are constructed by methods __new__ and __init__
– Wrap existing code into context managers with __enter__ and __exit__
The length of this course is 2 hours. Each topic shows clear examples of how to make your classes more Pythonic by implementing special methods, the secret weapon of your objects. This course has no exercises.
This course is meant for developer with basic Python experience who want to improve their skills or developers who bring experience from another language like c#, java, javascript, c++ and want to learn about Pythons unique language features.
This course is taught by Loek van den Ouweland, a senior software engineer with 25 years of experience. Loek is the creator of Wunderlist for windows, Microsoft To-do and Mahjong for Windows and has 15 years of experience teaching software engineering to a wide variety of students.
Course Curriculum
Chapter 1: Course Introduction
Lecture 1: Course Introduction
Lecture 2: Who are you?
Lecture 3: Meet the trainer
Lecture 4: MacOS: Install Python and Visual Studio Code (2024)
Lecture 5: Windows: Install Python and Visual Studio Code (2024)
Lecture 6: Why THIS course and not another one?
Chapter 2: Data model
Lecture 1: Data model Introduction
Lecture 2: str, repr
Lecture 3: Default behavior
Lecture 4: Object Identity
Chapter 3: Equality Operators
Lecture 1: Equality
Lecture 2: Comparing and sorting
Lecture 3: Hash
Chapter 4: Object Creation
Lecture 1: Instantiation
Lecture 2: Callable
Chapter 5: Container Objects
Lecture 1: Len
Lecture 2: Subscriptable
Lecture 3: Iterate
Chapter 6: More operators
Lecture 1: Operator Overloading
Lecture 2: Context Manager
Lecture 3: Bool
Chapter 7: Special Cases
Lecture 1: Other Cases
Lecture 2: Conclusion
Instructors
-
Loek van den Ouweland
Passionate Python Teacher
Rating Distribution
- 1 stars: 0 votes
- 2 stars: 0 votes
- 3 stars: 1 votes
- 4 stars: 7 votes
- 5 stars: 31 votes
Frequently Asked Questions
How long do I have access to the course materials?
You can view and review the lecture materials indefinitely, like an on-demand channel.
Can I take my courses with me wherever I go?
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don’t have an internet connection, some instructors also let their students download course lectures. That’s up to the instructor though, so make sure you get on their good side!
You may also like
- Top 10 Video Editing Courses to Learn in November 2024
- Top 10 Music Production Courses to Learn in November 2024
- Top 10 Animation Courses to Learn in November 2024
- Top 10 Digital Illustration Courses to Learn in November 2024
- Top 10 Renewable Energy Courses to Learn in November 2024
- Top 10 Sustainable Living Courses to Learn in November 2024
- Top 10 Ethical AI Courses to Learn in November 2024
- Top 10 Cybersecurity Fundamentals Courses to Learn in November 2024
- Top 10 Smart Home Technology Courses to Learn in November 2024
- Top 10 Holistic Health Courses to Learn in November 2024
- Top 10 Nutrition And Diet Planning Courses to Learn in November 2024
- Top 10 Yoga Instruction Courses to Learn in November 2024
- Top 10 Stress Management Courses to Learn in November 2024
- Top 10 Mindfulness Meditation Courses to Learn in November 2024
- Top 10 Life Coaching Courses to Learn in November 2024
- Top 10 Career Development Courses to Learn in November 2024
- Top 10 Relationship Building Courses to Learn in November 2024
- Top 10 Parenting Skills Courses to Learn in November 2024
- Top 10 Home Improvement Courses to Learn in November 2024
- Top 10 Gardening Courses to Learn in November 2024