Python objects with special methods – Create better classes!
$24.99 $11.99Track price
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
Specification: Python objects with special methods – Create better classes!
|
1 review for Python objects with special methods – Create better classes!
Add a review Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Price | $11.99 |
---|---|
Provider | |
Duration | 2 hours |
Year | 2021 |
Level | Intermediate |
Language | English |
Certificate | Yes |
Quizzes | No |
$24.99 $11.99
Sander van Deurne –
This training was an eye opener for me. I have used Python like I use C# and after watching I have already changed so many things in my code to make it Pytonic . The course is so practical that I could improve my codebase after each part.