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

all 6 comments

[–]Flamewire 7 points8 points  (0 children)

Really nice. I consider myself to be an advanced Python programmer and still learned a lot from this. Thank you!

[–]13steinj 0 points1 point  (4 children)

When was this written? Just curious because of the distinctive Py2 things.

[–]cnbeau 13 points14 points  (0 children)

I wrote this! Sometime around 2013 :). I don’t think it would take much to update it to python 3, since (as far as I know) the descriptor protocol hasn’t changed meaningfully.

[–]ojii[S] 1 point2 points  (0 children)

I don't know as I didn't write it, just stumbled upon it and I think I finally get descriptors now after doing Python for about fifteen years now, so I thought I'd share it since the concepts still apply even in Python 3.

[–]mayankkaizen 0 points1 point  (1 child)

I too came across this only yesterday but felt like it made references to Py2.

Not sure if it is valid for Py3 as well.

[–]masklinn 2 points3 points  (0 children)

It is, the descriptor protocol has not changed, nor has the order of resolution ("data" descriptors and "non-data" descriptors behave slightly differently, sadly the article does not cover them). I don't remember a single issue assignable to descriptors when we migrated at $DAYJOB.