Dive Into Python (英語) ペーパーバック – 2004/11/5
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
* Quick start to learning python―very example oriented approach
* Book has its own Web site established by the author: http://diveintopython.org/
Author is well known in the Open Source community and the book has a unique quick approach to learning an object oriented language.
By day, Mark Pilgrim is a developer advocate for open source and open standards. By night, he is a husband and father who lives in North Carolina with his wife, his two sons, and his big slobbery dog. He spends his copious free time sunbathing, skydiving, and making up autobiographical information.
For the original book, and free license terms, see diveintopython.org
Aerospace Engineer, one single class in C++ programming, but currently out in the "real world" doing other work. I've taken up learning Python as a hobby because it's much more productive than C++ for fooling around. I've made plenty of Matlab, C++, and a few Java programs for things as various as finite element calculations and simple asci games. I wanted to learn a language that was easier to use for graphics and general computer tasks than any of the above mentioned languages, so I went for Python. I wanted to spend time in Lisp, but I was disappointed with the available software. Right now I'm using a Python (x,y) install and the Eclipse IDE.
This book is organized in very manageable chunks (chapters), which probably take an hour or two to read, understand, and program up. It is far easier to read than the other programming book I have used, which was Savitch's absolute c++. Having been through some programming before, I don't find the concepts in this book too difficult to grasp, as I already understood the idea of pointers. Others (new programmers) that are unaware of what pointers are may be confused by some of the concepts in this book. I can honestly say that if you do not understand what pointers/addresses are in computer languages to hold off on this book until you know a little more. I was able to make sure the IDE was configured properly and that it was looking for files in the right place because I've dealt with IDEs and compilers before and can generally stumble my way through getting them to cooperate. Someone new to programming might get hung up on things like this and get frustrated, as this book expects you to already be able to wrangle the necessary tools and just program.
This book teaches by example, and expects you to follow along. The only downside of this is it's not quite as good as a reference as it would have been if it was more thorough, but plenty of help can be found online about Python. Another minor issue is the author doesn't necessarily announce when he is providing an example with an imaginary module, so when you try to run the hypothetical example the interpreter doesn't recognize the module you are trying to import.
I love how this book jumps right into business, and I am very impressed with the way that it immediately gets into the power and capabilities of the language. He doesn't beat the concepts to death, but expects you to actually take the time to understand what is going on without an excessive amount of "let me repeat this 10 times because you're stooopid" and handholding.
I highly recommend that if you want to get into Python right away to grab this book, install Eclipse by itself or a distribution like Python(x,y) for scientific/engineering tasks, and start plugging away.
In short, I use DIP in the same way that I use the abstracts of journal articles: it tells me everything I want to know 90% of the time and the other 10% of the time it tells me where to look to read more.
1) The book does what the title promises - dives head in.
2) It introduces relatively wide range of topics in a readable manner.
3) Uses reasonably sized code examples
4) The writing is pretty clear and understandable
5) Has practical tidbits occasionally comparing similar functionality against C, C++, Java and Perl. Nice.
6) Provides links to further reading on a topic. Also very nice.
1) Most topic discussions are a bit shallow and incomplete. For example it would be nice to present the reader with a comprehensive list of 'stuff' that may be done with a list, string, tuple, etc.
2) While there is a chapter on optimization, Mark doesn't mention the python profiler. I could live with that but there is no mentioning of python debugger (pdb) and there is nothing in the book about logging, either. These should not be considered 'advanced topics' and left out as they are helpful tool in learning any language (my opinion).
3) The book examples follow the 'Look at this cool yet obfuscated stuff I can do with Python - and oh, BTW, this is what it really means' methodology. While the follow-up discussions are reasonable, I would much more appreciate an explanation or at least mentioning of a concept before I get hit by a semi-cryptic line of code. On the other hand, the code is well annotated.
4) Mark uses repetitive examples to illustrate a point. 'This is how to do something', followed by 'This is how to do it better', followed by 'This is how to do it really well'. While illustrative of potential pitfalls, bugs or code deficiencies, this kind of writing makes it impractical to use the book as a reference. Open the book at the wrong page and follow the less than perfect example. Not a good thing. And boring - if I wanted to see it done the wrong way I'd use perl ;-).
5) Mark's statement that C++ virtual methods: 'confuse the hell out of me' (pg. 84) is rather amusing. I'd suggest to skip the amusement as it doesn't give a casual reader a whole lot of confidence in author's understanding of method overloading. Humor me some other ways.
However, this book is about Python, not C++, so I don't hold it against the author :)
Quite reasonable book for the money, gets you a pretty good jumpstart. Coming from C/C++ background, general programming concepts are not totally lost on me and there are enough practical differences between Python and C++ that this book was worth the read.
The chapters on HTML, XML and SOAP were the primary reason I bought this book. Again, while not covered in depth, I got enough from them to get started with a small practical application.
If you're serious about developing any kind of meaningful code this is a reasonable start but you'll need to dig deeper.
I recently opted for buying Wesley Chun's Core Python Programming (2nd Edition) (Core Series) as it covers more topics in greater depth (it's the details that matter a lot) in quite comprehensive manner while still very understandable by a novice programmer.
O'Reilley's Python Cookbook by Alex Martelli et. al is also a very good complementary reading exposing quite imaginative ways of using even some very basic capabilities of Python.