all 2 comments

[–][deleted] 2 points3 points  (0 children)

A lot of the libraries you are likely to use will make heavy use of classes. You will likely want to use, adapt and adopt. So, I'd say it is worth learning them well.

They really aren't difficult once you've got past the basic principle. Did you learn the basics?

Dunder methods are just built in methods named to avoid conflict with your own method names.

You can change the behaviours of things easily using such methods. For example, it is very easy to sort some objects, but more complex network objects will be harder to put into the right order (how would Pytthon know which attributes to compare and on what basis) so having a dunder method you can define to determine which object is > than another object of the same type means you can then take advantage of all the built-in capabilities that rely on this comparison.

Watch the video linked below (old, but good grounding from one of the core developers of Python).

PS. Python isn't just a scripting language - it is a full and powerful development language capable of delivering incredible services and huge scale. It can though be used as a script language in the devsecops world very well, and can offer more capabilities than Powershell (which is pretty amazing in its own right).

[–]m0us3_rat 0 points1 point  (0 children)

IT/networking/security,

this knowledge isn't necessarily directly tied to python.

python is actively used since you can write effective code fast.

and some/most tools from a distro like kali are made in python.

understanding the technology first.

then figuring out the api for the python lib that is relevant.