Python @property decorator explained

preview_player
Показать описание
In this video we look at encapsulation a bit in Python:

How to make readonly attributes with the @property decorator?

How to control setting of attributes with its setter feature?

And why is nothing really "internal" in Python? (What does "We are all consenting adults" mean in this context?)

Hope this is helpful, comment if you have questions or preferences for future content.

Consider liking and/or subscribing to the channel to get this content out to more people. Thanks!

---
To find out more about Pybites, check out our website:

See you in the next video ...
Рекомендации по теме
Комментарии
Автор

No video so far stresses why we need property decorators yet. Just how

chriskeo
Автор

So this is just a matter of convention rather than this decorator having any useful feature?

Rapptor