property()

Python has a builtin funciton called property() that can create an attribute instance when assigned to a variable. A property will have a getter and setter method already built into it like when you use a property decorator on a function. I am still puzzling over it but it was interesting and explained a lot of code that is out there that uses @property as a decorator in Python3 codebases. It is a common construct to use although getter and setter can be an anti-pattern and there are ways to implement properties that are more pythonic. It is hard to put everything together beyond toy examples and actually build real stuff with it. Reading documentation gives a lot of theory but without praxis all theory is shit. It is all about building. I have been reviewing code from Bellingcat's github repository and it is full of well made Python3 based tools. Some of the regular expressions implemented are beyond my reckoning but for a advance beginner as myself I can surmount the hurdles with more effort. Learned about spiderfoot which is a tool for finding active email accounts on social media. It is almost solely written in Python and I will look into the code base further in the future to learn how it works. I reviewed some of the code for an EDGAR database scrapper ,EDGAR is a Security Exchange Commission database, just recently and found it well written as any Bellingcat tool is.

Comments

Popular posts from this blog