Python Cookbook: Recipes for Mastering Python 3

ByDavid Beazley

feedback image
Total feedbacks:13
11
1
0
1
0
Looking forPython Cookbook: Recipes for Mastering Python 3 in PDF? Check out Scribid.com
Audiobook
Check out Audiobooks.com

Readers` Reviews

★ ★ ★ ★ ★
munro richardson
Excellent.

I recently began a Python project and realized that my skills had gotten pretty rusty.
Also, I decided I wanted to move up to Python 3.
The book provided many answers and insights; I have found it invaluable.
Although some parts of the book are terse, the language is, for the most part, clear and direct, without mumbo-jumbo, and it wasn't written to show how smart the authors are. (It's obvious that they are smart, smart enough to know the importance of good communication.)
IMO, David Beazley is a great teacher and asset to the Python programming community; this book is a valuable contribution.

Note: "This book is aimed at more experienced Python programmers who are looking to deepen their understanding of the language and modern programming idioms."
"This is not a book designed for beginners trying to learn Python for the first time."

Disclaimer: I haven't read the book cover-to-cover, but I've browsed much of it and I use it as a reference, where and when needed. Of course it's not all things to all people, and sometimes you need to search the internet or look elsewhere, but not often.
★ ★ ★ ★ ★
nicole dennison
Geerhardus Vos (1862-1949) was an American Calvinist theologian who taught Biblical Theology at Princeton Theology from 1893-1932. He also wrote works such as Reformed Dogmatics: Theology Proper,Reformed Dogmatics: Anthropology,Reformed Dogmatics: Christology,Reformed Dogmatics: Soteriology, and Reformed Dogmatics: Ecclesiology, The Means of Grace, Eschatology.

Vos explains in the Preface, "Biblical Theology occupies a position between Exegesis and Systematic Theology in the encyclopedia of theological disciplines. It differs from Systematic Theology, not in being more Biblical, or adhering more closely to the truths of the Scriptures, but in that its principle of organizing the Biblical material is historical rather than logical. Whereas Systematic Theology takes the Bible as a completed whole and endeavors to exhibit its total teaching in an orderly, systematic form, Biblical Theology deals with the material from the historical standpoint, seeking to exhibit the organic growth or development of the truths of Special Revelation from the primitive pre-redemptive Special Revelation given to the close of the New Testament canon."

Here are some representative quotations from the book:

"at the beginning of all Theology lies a passive, receptive attitude on the part of the one who engages in its study. The assumption of such an attitude is characteristic of all truly exegetical pursuit." (Pg. 4)
"The knowledge from nature, even though corrupted, is presupposed. Only, this does not involve that there is a natural transition from the state of nature to the state of redemption. Nature cannot unlock the door of redemption." (Pg. 21)
"On the whole we may say that revelation, while increasing in frequency, at the same time becomes more restricted and guarded in its mode of communication. The sacredness and privacy of the supernatural begin to make themselves felt." (Pg. 69)
"To the Biblical writers faith is not a comon denominator to which after some hazy fashion every religious sentiment and aspiration can be reduced." (Pg. 83)
(In the Old Testament) "there was a lack of freedom even in the presentation of and attendance to the gospel. The gospel was preached under constraint of law and received under the same. It was not permitted to rise superior to the legal environment in which it had been placed. Only the New Testament has brought the full liberty in this respect." (Pg. 129)
"There are a number of statements in the early prophets, as there are in other parts of the Old Testament, which vividly speak of other gods and ascribe actions or movements to them seemingly implying existence. It is also possible, however, that such statements must be explained on the basis of rhetorical personification." (Pg. 237)
"We are here in a sphere full of anthropomorphism, but this furnishes no excuse for neglecting or glossing over the subject. An anthropomorphism is never without a core of important truth, which has only to be translated into more theological language, to enrich our knowledge of God." (Pg. 255)
"Hence the Apocalypse mingles with the pictures of the final events transpiring with word of prophecy and of interpretation. We may say, then, that a third epoch of revelation is still outstanding. Strictly speaking, however, this will form less a group by itself than a consummation of the second group. It will belong to New Testament revelation as a final division. Mystical revelation claimed by many in the interim as a personal privilege is out of keeping with the genius of Biblical religion." (Pg. 304)
"And the best proof for the Church as an end in itself lies in the inclusion of the Church in the eschatological world, for that world is not the world of things aimed at, but of things attained unto."

Vos's book is of great value to anyone interested in biblical theology, systematic theology, or Calvinism.
★ ★ ★ ★ ★
lara
Vos' reasoned apologetic on believing Abraham as the father of all those who have faith, is fundamental to our correct understanding of progressive revelation. The nation of Israel was constituted, and the spiritual commonwealth of the church was declaratively formed, not when Jacob's name became Israel, or when 12 sons were born to him, but when God's verbal promise to Abraham thereof was made, effectually "calling those things that be not as though they were" (Rom 4:17). Says Vos:

'The first outstanding principle of divine procedure with the patriarchs is the principle of election. This is the tremendous significance of the call of Abraham.' p 76

Both Peter and Paul, quoting the promise in the NT, translate passively "shall be blessed" [Gk: eneulogethesontai] (Acts 3:25; Gal 3:8). Vos explained: 'The reasoning is in substance as follows: through the covenant with Abraham the relation between God and Israel was put on a foundation of promise and grace; this could not be subsequently changed.' p 79

'He begins with giving promises. The keynote is not what Abraham has to do for God, but what God will do for Abraham. Then, in response to this, the subjective frame of mind that changes the inner and outer life is cultivated. Closely connected with this feature is another, the historical-progressive character of the religion of revelation. In it the all-important thing is that God has acted in the past, is acting in the present, and will act in the future.' p 80

'we notice a third important feature of the revelation: that it emphasizes most strongly, both in word and act, the absolute monergism of the divine power in accomplishing the things promised. This explains why, in the life of Abraham, so many things proceed contrary to nature. Abraham was not permitted to do anything in his own strength or resources to realize what the promise set before him. In point of fact, he attempted to proceed on the principle of synergism in proposing to God that Ishmael should be considered the seed of the promise. But Abraham was kept childless until an age when he was as good as dead, that the divine omnipotence might be evident as the source of Isaac's birth.' pp. 80-81

Romans 4:17 says of the birth of Isaac, based on God's promise to Abraham: "(He) who gives life to the dead and calls into existence the things that be not as though they were", so that although impotent, yet through believing Abraham "all the families [Gk: patriai] of the earth shall be blessed." Vos called this 'the creative interposition of God.' p 85 Calvin pointed out the gospel-promise contained in the Abrahamic covenant: 'And hereby it appears that the covenant of God, which was then proper to the Jews alone, is not only common to all men, but is made with us expressly; otherwise, we could not conceive that hope of salvation which is firm enough out of the gospel. Therefore, let us not suffer this promise to be wrung from us, which is, as it were, a solemn declaration, whereby the Lord makes us His heirs together with the fathers.' Commentary on Acts 3:25

The purpose and consequence of the gentiles believing the gospel was a'priori stated: "Therefore it is of faith, that is might be by grace; to the end the promise might be sure to all the seed" (Rom 4:16). Salvation is the unfolding of God's eternal purpose, in accordance with His good pleasure and the secret counsel of His will.
An Introduction to Computer Science - 3rd Ed. - Python Programming :: Practical Programming for Total Beginners - Automate the Boring Stuff with Python :: A Playful Introduction To Programming - Python for Kids :: Python Programming for the Absolute Beginner - 3rd Edition :: The Linux Command Line: A Complete Introduction
★ ★ ★ ★ ★
kajal
The "Python Cookbook" (3rd edition) is over 600 pages full of content. The recipes vary extensively in difficulty and scope. From simple string concatenation to writing a (BNF) recursive decent parsers.

The book covers Python 3.3. The authors warn some recipes aren't backward compatible with 2.X. While I would have liked more on the transition, I'm not a Python developer - I just do some scripts. It's entirely possible nobody cares about compatibility.

My favorite recipe was on CSV. Paring was shown but a library was also covered along with the reasons to not implement it yourself.

The recipes assume a working knowledge of Python. I have just enough knowledge to be able to follow them. And the book is a great resource with common idioms and techniques. It is certainly an advanced book and I highly recommend it. (If you are starting out with Python, I recommend reading "Think Python" first.)

Disclosure: I received a free copy of this book from the publisher in exchange for writing a review.
★ ★ ★ ★ ★
summer dansie
"Biblical Theology: Old & New Testaments" is Dr. Vos' most famous and comprehensive work. Dr. Geerhardus Vos served as Professor of Biblical Theology at Princeton Theological Seminary for 39 years starting in 1894, exercising a significant influence on many eminent theologians of the 20th century, such as Machen, Murray, & Van Til. His insight into Biblical revelation is truly profound, and of his writings that I have read, this book is probably the best place to start. When the current faculty of Westminster Seminary (PA) had their (short) personal reading recommendations listed at the bookstore, this book found its way onto more lists than perhaps any other besides Calvin's Institutes. It would also be well worth introducing this book by reading Vos' inaugural address to the faculty of Princeton, available online.

It should be pointed out from the outset, that the term "Biblical Theology" is itself rather unfortunate, as Dr. Vos points out in his introduction, since all true theology has the Bible as its source and its criterion. In his inaugural address (henceforth IA), he said that "Biblical Theology, rightly defined, is nothing else than the exhibition of the organic process of supernatural revelation in its historic continuity and multiformity." Systematic Theology, for example, examines and organizes revelation systematically and logically, whereas Biblical Theology operates historically. It is important to understand that, as Vos always insisted, neither of the disciplines is more biblical than the other. Rather, they are two ways of studying the same phenomena from different perspectives.

The concept of the organic nature of revelation is prominent. Dr. Vos traces the growth of revelation as it parallels redemption. The great events in the history of redemption were accompanied by corresponding revelation. He saw that "the heart of divine truth, that by which men live, must have been present from the outset, and that each subsequent increase consisted in the unfolding of what was germinally contained in the beginning of revelation. The Gospel of Paradise is such a germ in which the Gospel of Paul is potentially present; and the Gospel of Abraham, of Moses, of David, of Isaiah and Jeremiah, are all expansions of this original message of salvation, each pointing forward to the next stage of growth, and bringing the Gospel idea one step nearer to its full realization." (IA) It will be seen how squarely opposed this view of Scripture is to Dispensationalism.

Another central feature of revelation brought out by Vos is its multiformity, an understanding of which is absolutely indispensable for proper Biblical interpretation. The great pitfall, to which probably all of us fall prey to some extent, is to exalt one aspect or feature of Biblical truth at the expense of another. A result would be, for example, Martin Luther's aversion to the book of James, based on his perception of its contradictory character to the teachings of the Apostle Paul. Not only does the truth have many facets which form an organic unity, but the time and the people that God chose to give His revelation were uniquely chosen to best emphasize the particular ideas. In Vos' words, "The truth having inherently many sides, and God having access to and control of all intended organs of revelation, shaped each one of these for the precise purpose to be served. The Gospel having a precise, doctrinal structure, the doctrinally-gifted Paul was the fit organ for expressing this, because his gifts had been conferred and cultivated in advance with a view to it."

Vos traces the history of revelation, beginning with the pre-redemptive revelation, through the periods of Noah, the Patriarchs, Moses, and finally the prophets in the Old Testament, and then on to the revelation preceding the birth of Jesus as well as Jesus' own self-disclosure in the four Gospels. He does not specifically address the remainder of the New Testament in this book. Vos' great strength is perceiving the unfolding progress of the plan of God for redemption, and he helped me understand things in the Bible that I never saw before. For instance, he describes how the period leading up to Noah was intended to show to mankind, starting immediately after the fall, just how far sin would go if it was left to itself. He explains how the division of tongues at Babel was a redemptive act of God, out of faithfulness to his promise to not destroy the earth again, since "if the whole of humanity had remained concentrated, the power of sin would likewise have remained united, and doubtless soon again have reached stupendous proportions."

In terms of difficulty, I think that Vos should be well within reach of anyone who is willing to concentrate a little bit. It is not light reading, but I did not find it nearly as demanding as, for instance, Van Til. It is probably true that the more effort you put into it, the more you will get out, but I did not find this book to be a chore to read by any means. I enjoyed this book very much, and I believe that my understanding of God's Word has been greatly helped by reading it. I hope that what I have said here will encourage others to read this book, as I am confident that it will be very beneficial to a believer's understanding of God's Word.
★ ★ ★ ★ ★
lindsey hawes
This cookbook seems to follow closely in the vein of other cookbooks in the series. Programmers with as least some experience with Python will likely get the most out of this material. Certain idioms are taught and it is nice to already have a foundation to build upon. Some of the recipes are better used as information from which to start a solution rather than the entire solution-i.e. readers should be able to use this starting point presented and be able to apply it to the specific context they are working in. It should be noted that this edition is geared for Python 3. The format of Problem, Solution, and then Discussion is followed in the recipes and I found most of the Discussion sections informative and worth taking time to read and consider the points presented. There are many practical recipes and I could see this being referenced when in need of a quick thought starter.

Overall conclusion: Solid cookbook that seems to follow the quality of most in the series.

Disclaimer: I got a copy of this book for review as part of O'Reilly blogger program.
★ ★ ★ ★ ☆
winter haze
The "Python Cookbook" is a book that brings the Python scripting language to O'Reilly's popular "Cookbook" format. Each Cookbook provides a series of "Recipes" that teach users common techniques that can be used to become productive quickly and as a reference to those who might've forgotten how to do something.

I reviewed this book in the Mobi e-book format. Reading it on Kindle for PC, the Table of Contents only shows the major sections rather than the individual recipes and this made it harder to find what I was looking for. This is apparently a limitation of Kindle for PC, since my Kindle 3 and Kindle for Android had no such issue.

When I use an O'Reilly "Cookbook", I judge it according to its' usefulness: Can I become productive quickly? Is it easy to find what I need? Does it provide helpful tips? Does it teach me where to find the answers to my questions?

This book is not targeted at new Python programmers, but that's where I'm at. The best way for me to learn a new scripting language is to dive right in and try to write something useful, and that was my goal for the "Python Cookbook". I also had "Learning Python" handy to cover any of the basics.

My first Python script was written to read in lists of subnets from two separate files and check that every subnet in list B was also in list A.

I used Recipe 13.3 to parse the command line options. Recipe 5.1 showed me how to read and write files. Recipe 2.11 taught me how to strip carriage returns out of my lines. Recipe 1.10, "Removing Duplicates from a Sequence while Maintaining Order", was very helpful and I was able to reuse the code in my own script. Recipe 2.14, "Combining and Concatenating Strings", helped me with my print statements. Considering this was the first Python script I ever wrote and that it ran, I consider both it and the "Python Cookbook" a success.

I had a bit more trouble with my second script. I was trying to write a script to find the subnet address given an interface address in CIDR notation. Recipe 11.4 introduced the ipaddress module, but this module refused to accept a string variable containing the interface in CIDR notation. I ended up installing another module (netaddr) I found via Google and things went better after that. I suspect the problem was that I was using ActivePython 2.7.2.5 [64 bit] and this book was written for Python 3.

As a DNS professional I was disappointed that there were no DNS-related recipes in the Network and Web Programming section, but Web-related topics were well-represented in the book.

The "Python Cookbook" doesn't seem to have quite the depth and organization of the "Perl Cookbook" but I'm sure I will rely on it heavily as I learn to use Python. It did allow me to be productive very quickly and it passes the "Cookbook" standard with flying colors. Any book that can get me to the point of writing a working, useful script in less than a day is worth using. I recommend this book to anyone who has a basic understanding of Python and wants to get past "Hello, World" and "Eat Spam" as fast as possible.

Reviewer's Note: I received a free copy of the "Python Cookbook" which was used to write this review.
★ ★ ★ ★ ★
anthony cornett
In addition to the reviews already written about this book, I'd also say that this book ought to be read by Christians desiring a solid explanation of the history of redemption found in Scripture. Vos wrote very well, though this is by no means an easy book. In fact, it could easily turn people off if they aren't already determined to read Vos. For those who are willing to read difficult work, this is a special study. Vos addresses questions that, I think, most Christians have asked themselves about the lives and acts, divine and human, described in the Bible. He addresses issues in early 20th c. biblical scholarship and it'll be seen that they are still relevant, though not always. This book deserves, demands, close attention. One may find As Far as the Curse is Found a good distillation of Vos.
★ ★ ★ ★ ★
russell bates
Geerhardus Vos's "Biblical Theology" is biblical theology at its best. Vos was born in the Netherlands in the early 1860s and came to the United States when he was 19 years old. He spent his career teaching at Princeton Seminary. (He retired in 1932, at about the time Princeton abandoned its Reformed roots.) The book is not easy ready. Approximately 400 pages long (exclusive of the index), it is densely packed with information. However, someone patient enough to read it carefully will be amply rewarded with new insights, as Vos traces the development of the theological themes of the Bible from before the time of Moses to their full fruition in the New Testament.

The first part of the work is titled "The Mosaic Epoch of Revelation." This actually begins with a discussion of God's revelation to man in the Garden of Eden, proceeds through the Noachian revelation, the Patriarchs, and the time of Moses.

In Part Two ("The Prophetic Epoch of Revelation) Vos looks at the place of the prophet in revelation, the concept of a profit, the reception of the prophetic revelation, how prophecy was communicated, and finally the content of Old Testament prophecy.

Finally, Vos focuses his attention on the New Testament period, where he discusses revelation in relation to John the Baptist and the public ministry of Jesus.

"Biblical Theology" is best read in conjunction with Vos's "Pauline Eschatology," since the former of these books does not discuss the latter in any detail.
★ ★ ★ ★ ★
van pham
In this excellent book Vos shows the progression of God's plan of Redemption and revelation to man. Vos very clearly shows the harmony as well as the tension between the Old and New testaments.
Definitely not a book for unlearned folk wanting a quick introduction to reformed theology. Especially those inclined to fear big words. :-)
★ ★ ★ ★ ★
nathalie
I received this book as part of the Blogger review program. The book has 15 chapters full of recipes on various aspects of Python ranging from data structures to concurrency and system programming. Authors do a great job and while you won't perhaps benefit from reading this book page to page, but you may certainly as well, since you will most likely learn new things all throughout.

All in all great book, must have!
★ ★ ★ ★ ★
zukaa
Biblical theology is all the rave this days. Many books have been written that explores and expounds this theological discipline. This book still stands head and shoulders above the rest. Many other books seem to be groping in the dark, while Vos shines a bright light for all to see.

The writing style is cumbersome, but there is a great reward for every hour of labor.
★ ★ ☆ ☆ ☆
mark65
This book has a good amount of information in it, and as such has to be fairly wordy. I, however, found it to be wordy to the degree the author sounds arrogant, trying to impress the reader with his vocabulary (when simpler words would have done just as well and made the book more enjoyable to read.) It is the kind of book one reads for seminary, not for pleasure.
Please RatePython Cookbook: Recipes for Mastering Python 3
More information