Object Oriented Python | Metaprogramming Lecture 0

preview_player
Показать описание
Introduction to the metaprogramming paradigm in the context of object oriented Python.

Covered:
- Python classes
- Duck Typing
- __init__ vs __new__
- __dict__

First lecture in the second iteration of my student-taught-class on Metaprogramming at the University of Virginia.
Рекомендации по теме
Комментарии
Автор

You have a mistake there.
__new__ is not a static method, it is a class method - which is why it takes cls as a parameter where a static method doesn't take any special parameters.
anyways, thanks for uploading the content :)

refaelcohen