I currently work with Python for a while and I came to the point where I questioned myself whether I should use "Properties" in Python as often as in C#.
In C# I've mostly created properties for the majority of my classes.
It seems that properties are not that popular in python, am I wrong?
How to use properties in Python?
regards,
If you make an attribute public in C# then later need to change it into a property you also need to recompile all code that uses the original class. This is bad, so make any public attributes into properties from day one 'just in case'.
If you have an attribute that is used from other code then later need to change it into a property then you just change it and nothing else needs to happen. So use ordinary attributes until such time as you find you need something more complicated.
Use of properties in python like in example C#