Making Descriptors that act as specialized properties can be tricky, especially when it comes to storing the data the property controls. I should know, I literally wrote the book. Looking at how other languages do it – especially Kotlin’s Delegated Properties – I felt that Python could use a system that works more like that. Continue Reading
Descriptors
So, the original version of my print book ended up having a messed up cover. The color was off and there were strange artifacts all over. I was able to fix this, and the printers sent me a copy to verify that it truly was. Soooo, I now have an extra copy of my book, which I will now be giving away!
I’ll be doing a random drawing for it. To enter, simply send me an email at sad2project+pythonbook@gmail.com that says something along the lines of “I wanna win!”. The last day to enter is May 25th. On the 26th, I will choose randomly from the emails, then email you back to get the address to send the book to. I will be covering shipping costs, so everything is completely free to you!
This may come as a shock to my regular readers, but even as a Pythonista and Kotlinite, I’m a little jealous of JavaScript. That’s right; I – a JS hater – am jealous of JavaScript. More specifically, I’m jealous of JavaScript’s object literals (also full-featured function literals, but I don’t think I can do anything about that). Yes, in many respects, JS object literals are almost exactly the same thing as Python’s dicts, but there is one important difference: dot notation access.
So here’s my attempt at accomplishing the closest thing possible toward making object literals in Python. Continue Reading
Hey readers! I finally finished publishing my book, Python Descriptors: A Comprehensive Guide! It is currently available on Lulu, and will eventually be available on Amazon, B&N, and other sites. It comes in both a Digest size paperback or ebook. So, go check it out and buy a copy, if you’d like!
For my followers, I’ll work on getting the deal out soon. Also, if anyone who has a blog, podcast, or other public content and would like to do a review of my book, I’ll get you a free pdf copy of the book to do the review from! Email me at sad2project+pythonbook@gmail.com and let me know.
I’ll soon get an additional blurb on the site’s sidebar so that it’s easy to find a link to the book.
Intro
Today, I give you the second (and last) excerpt from my book, and it’s the last chapter. It brushes over some of the cooler examples of descriptors out there. It’s a short sample, and I feel kind of bad not giving you something juicier, but too much of the rest of the book has references to other chapters and discussed ideas, making it difficult to use as an excerpt. Continue Reading



