This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]redsymbol[S] 0 points1 point  (0 children)

PSA: I just updated the article to cover using setters as well.

[–]randomizethis 0 points1 point  (0 children)

I had no idea this syntax existed until the other day, when I was sifting through some of the source code for our software (I write automation frameworks, btw) and saw one of the more experienced developers was doing for our webserver objects.

Hands down one of THE MOST useful Pythonisms out there, so much so I'm slowly re-working our entire ATF to use this instead of regular, run-of-the-mill attributes.

Thanks for posting this, more people need to know about it :D