I have set myself the task of learning Python, or at least enough Python to learn how algos work and how to tweak them. Although I can get my head around most of the concepts in Python (variables, functions, If, ELIF, looping etc.) the area that I am really struggling with is the whole concept of using properties with objects, so for example:
myobject.myproperty
I just don't understand this bit of it at all - Is there some really simple tutorial that can explain how properties work and are applied to objects, specifically:
- I am assuming that def initialize(context): is a function and not a class, and yet dot properties can be used with it; is that normal and to all intents and purposes do the dot properties work like they would with a class?
- Is there a way to easily understand the overall concept of properties and how they work with objects, specifically {dicts}?
- Can I assign properties to objects myself?
- Is there a pre-defined list of properties that can be called?
- How do I define properties that I want to call myself?
I must have looked at a dozen tutorials and I just cannot get my head around it. If anyone has any guidance or can point me at a tutorial that will specifically explain this (rather important!) part of Python, that would be great.
Thanks so much.