Python 3 setattr() built-in function TUTORIAL

preview_player
Показать описание
Tutorial on how to use the setattr() or “set attribute” built-in function from the Python 3 Standard Library.

📖 You can check out the Udemy course (Python Built-in Functions) here:

Documentation:

⚙️ Recommended Computer Gear:

✈️ Recommended Digital Nomad Gear:
Рекомендации по теме
Комментарии
Автор

Thx Brendan 🎉

Exact video I was looking for!


Maybe one on functions partial?

chriskeo
Автор

Trick so that only the attributes of the function that we have created are displayed:
for attribute, value in Jeep.__dict__.items():
if not attribute.startswith("__"):
print(attribute, "=", value)

serafin
Автор

Thank you very much for this video! It was simple and very helpful for me :)

tymothylim
Автор

hp? Healthpoints. Okay, he seems to be a gamer.
"Or horsepower right now." Okay, I seem to be a gamer.

SuperQuwertz
Автор

Hi brenden I was wondering if we use this Dunder method
__getattr__ can we get a attribute outside of the class
Name = “bob”
Class Newman:
def __getattr__(self, newname):

Does this code work?

n