3 ms·
I wish someone would write a good book focused on more advanced aspects of the Python language: generators, metaclasses, descriptors, etc. From what I could tel
by rhizome31 15y ago
I wish someone would write a good book focused on more advanced aspects of the Python language: generators, metaclasses, descriptors, etc. From what I could tell from the reviews and TOC, some books such as Pro Python or Expert Python Programming seem to introduce those techniques, but it doesn't seem to be very in depth, and I don't need a book for the other topics they cover. There are a lot of blog posts about this but it's always based on toy examples, so while it's not hard to grasp how those techniques work by themselves, I fail to see how to use them in real-world projects. I'd love to read an in-depth guide on those techniques, with several examples of progressive complexity that solve real-world problems. I don't think it needs to be very long, but it probably needs to be well thought.
- Wilduck 15y agoMy favorite way to learn about something like metaclasses in python is to go to stackoverflow and search for '[python] metaclasses' then order by votes. Open up a few of the links that look interesting, and you'll get to see some good uses. In this case, you'll also end up with this awesome explanation near the top: http://stackoverflow.com/questions/100003/what-is-a-metaclass-in-python http://stackoverflow.com/questions/100003/what-is-a-metaclas... In practice, this works for a wide variety of topics.