Fluent Python
Fluent Python

Author: Luciano Ramalho
Publisher: O'Reilly
Pages: 770
ISBN: 978-1491946008
Print: 1491946008
Kindle: B0131L3PW4
Audience: People who already program in Python
Rating: 5
Reviewer: Mike James 

A book whose title doesn't give the reader sufficient information to pick it out from the crowd is among our short list of Best Books of 2015. So if you missed this recommendation first time around, here's another chance to discover why it should be on your bookshelf.

 

This substantial tome is not about the fluent programming style so common in other languages, but about becoming fluent, i.e. an expert. As such it isn't for the complete beginner, but for everyone else the conclusion is just go out and buy a copy. If you write Python then you will enjoy reading this book and get a lot from it - I will now explain why and what. 

The only real problem with Fluent Python is its title as it really doesn't give the prospective reader any idea what to expect. I can't really complain too much because if pushed I'd have a hard time coming up with a title that tells you much either - perhaps Expert Python or Inside Python but these don't quite get it either. 

There also is an issues with terminology in other places in the book. For example the first section of the book is called The Python Data Model. Which is fine if you are a serious Pythonista but if you "just write programs" you might find confusing. The Data Model is more what would be called the Object Model in other languages. The author does explain this, but not until quite late on - which might leave some innocents wondering when data is going to come into the story.

 

Banner

 

The whole first part of the book is essentially about the special methods and you will understand Python much better after reading it. 

All of the chapters have examples that illustrate the ideas or the problems that some feature of Python attempts to solve. These usually amount to personal notes and recollections from the author of who did what and why in the Python community. It all helps to make you feel more part of the whole. If you have only "just used" Python then it also makes you see that it isn't the random collection of language features that some criticise it for being. 

Part II is on Data Structures and covers sequences, tuples, dictionaries, sets and text and bytes. At the end of reading it you will no longer be mystified as to why Python has tuples and Unicode will no longer frighten you - ok it will but not quite as much. 

Part III is called Functions as Objects and it covers why any language, Python in particular that has first class functions needs to do things differently. We start off with a discussion of what a first class function is and then move on to how this changes the classical design patterns. This is deep and certainly deserves to be better known. A lot of it applies to other languages notably JavaScript. 

Part IV continues the theme of looking at the way objects are used with a look at Object-Oriented Idioms. We start off with a topic that is a pet subject of mine - variables are not boxes. This brings out the distinction between a value and a reference. If you think in terms of variables being references then everything makes sense. This I agree with but I still prefer to think of variables as boxes that store things - just they store different types of things, values and references. There is, of course, a lot more than this in this section - interfaces, multiple inheritance, operator overloading an more. 

 

fluentpython

 

Part V is called Control Flow and it deals with what you might call non-standard alternatives to control statements. Python supports iterables, iterators and generators which are familiar from other languages but it also has context managers, coroutines, futures and async which are arguably not so common. 

The final part of the book is called Metaprogramming but you might be forgiven for thinking that much of the earlier part of the book was a bit "meta". In this case the meaning is how you can implement dynamic properties and attributes and make use of metaclasses. 

This is a very simple book to review because it is almost uniformly good - a rare thing in the world of programming books. I'm not saying that you won't disagree with what the author says, but in doing so you will learn a lot and have fun. About the only thing bad I can say about this book is that it is big and has a tendency to fall apart, which is a shame as it is a "keeper". 

If you are an intelligent Python programmer just buy a copy and spend the next year reading it. 

 

 

For more Python titles see Books for Pythonistas a roundup of our reviews about this language at intermediate level

 

Banner
 


Build Awesome Command-Line Applications in Ruby 2

Author: David B. Copeland
Publisher: Pragmatic Bookshelf
Pages: 224
ISBN: 978-1937785758
Audience: Ruby Developers
Rating: 2
Reviewer: Mike James

This is an updated edition of an earlier book but the only substantive changes are to make it work with Ruby 2.



Beginning C# 6.0 Programming with Visual Studio 2015

Author: Benjamin Perkins, Jacob Vibe Hammer & Jon D. Reid
Publisher: Wrox
Pages:840
ISBN: 978-1119092117
Print:  1119096685
Kindle: B01AAVMISU
Audience: Complete beginners/ Beginners with OOP background 
Rating: 2/3
Reviewer: Mike James

C# is still impor [ ... ]


More Reviews

 

Last Updated ( Wednesday, 30 December 2015 )
 
 

   
Banner
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.