Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Mastering Object-oriented Python Paperback – April 22, 2014
|New from||Used from|
Frequently bought together
Customers who bought this item also bought
Customers who viewed this item also viewed
About the Author
Steven F. Lott
Steven F. Lott has been programming since the 70s, when computers were large, expensive, and rare. As a contract software developer and architect, he has worked on hundreds of projects from very small to very large. He's been using Python to solve business problems for over 10 years.
Steven is currently a technomad who lives in various places on the east coast of the US.
If you buy a new print edition of this book (or purchased one in the past), you can buy the Kindle edition for only $2.99 (Save 82%). Print edition purchase must be sold by Amazon. Learn more.
For thousands of qualifying books, your past, present, and future print-edition purchases now lets you buy the Kindle edition for $2.99 or less. (Textbooks available for $9.99 or less.)
Author interviews, book reviews, editors picks, and more. Read it now
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
Chapter 3 digs into attributes, properties and descriptors. You will learn how to use __slots__, create immutable objects and work with “eagerly computer attributes”. Chapters 4-6 are about creating and working with callables, contexts and containers. There is information about memoization, creating custom callables, how to use __enter__ / __exit__, working with the collections module (deque, ChainMap, OrderedDict, etc) and more! Chapter 7 talks about creating your own Number, which was something I’d never considered doing. The author admits that you normally wouldn’t do it either, but he does teach the reader some interesting concepts (numeric hashes and in-place operators). Chapter 8 finishes up Part 1 with information on decorators and mixins.
Part 2 is all about persistence and serialization. Chapter 9 focuses on JSON, YAML and Pickle. The author favors YAML, so you’ll see a lot of examples using it in this section. Chapter 10 digs into using Python shelve objects and using CRUD operations in relation to complex objects. Chapter 11 is about SQLite. Chapter 12 goes into details of using Python to create a REST server and create WSGI applications. Chapter 13 rounds out Part 2 by covering configuration files using Python, JSON, YAML and PLIST.
The last section of the book covers testing, debugging, deploying and maintaining. It jumps right in with chapter 14′s topics on the logging and warning modules. Chapter 15 details how to create unittests and doctests in Python. Chapter 16 covers working with command line options via argparse and creating a main() function. In chapter 17, we learn how to design modules and packages. The last chapter of the book goes over quality assurance and documentation. You will learn a bit about the RST markup language and Sphinx for creating documentation.
I found Part 1 to be the most interesting part of the book. I learned a great deal about how classes work, metaprogramming techniques and the difference between callables and functions. I think the book is worth purchasing just for that section! Part 2 has a lot of interesting items too, although I question the author’s insistence on using YAML over JSON. I also do not understand why PLIST was even covered as a configuration file type. Part 3 seemed a bit rushed to me. The chapters aren’t as detailed nor the examples as interesting. On the other hand, I may be a bit jaded as this section was mostly material that I already knew. Overall, I found this to be one of the best Python books I’ve read in the last few years. I would definitely recommend it to anyone who wants to learn more about Python’s internals, especially Python’s “magic methods”.
A few warnings: This is a big book (~ 600 pages). You can read the whole thing, but I believe that it will be much more useful as a handbook. Also note that the book assumes familiarity with Python 3 and Design Patterns.