Pro Python (2nd Edition) by Marty Alchin, J. Burton Browning

By Marty Alchin, J. Burton Browning

You’ve realized the fundamentals of Python, yet how do you're taking your talents to the subsequent level? whether you recognize adequate to be efficient, there are many beneficial properties that may take you to the subsequent point in Python. professional Python, moment variation explores thoughts and lines more often than not left to experimentation, permitting you to be much more efficient and creative.

In addition to natural code matters, seasoned Python develops your programming thoughts and methods, in order to help in making you a greater Python programmer. This booklet will enhance not just your code but in addition your realizing and interplay with the numerous tested Python communities.

This publication takes your Python wisdom and coding talents to the subsequent point. It exhibits you ways to put in writing fresh, leading edge code that would be revered through your friends. With this publication, make your code do extra with introspection and meta-programming. And study and later use the nuts and bolts of an program, tier-by-tier as a posh case examine alongside the way.

For additional information, together with a hyperlink to the resource code referenced within the e-book, please stopover at http://propython.com/.

Show description

Read or Download Pro Python (2nd Edition) PDF

Similar python books

Essential SQLAlchemy

Essential SQLAlchemy introduces a high-level open-source code library that makes it more straightforward for Python programmers to entry relational databases resembling Oracle, DB2, MySQL, PostgreSQL, and SQLite. SQLAlchemy has turn into more and more renowned given that its unencumber, however it nonetheless lacks reliable offline documentation. This sensible publication fills the distance, and since a developer wrote it, you get an goal examine SQLAlchemy's instruments instead of an advocate's description of all of the "cool" features.

SQLAlchemy contains either a database server-independent SQL expression language and an object-relational mapper (ORM) that allows you to map "plain previous Python objects" (POPOs) to database tables with no considerably altering your latest Python code. crucial SQLAlchemy demonstrates easy methods to use the library to create an easy database program, walks you thru uncomplicated queries, and explains the best way to use SQLAlchemy to connect with a number of databases at the same time with an identical Metadata. you furthermore mght find out how to:

* Create customized varieties for use on your schema, and while it's beneficial to take advantage of customized instead of integrated forms
* Run queries, updates, and deletes with SQLAlchemy's SQL expression language
* construct an item mapper with SQLAlchemy, and comprehend the variations among this and lively list styles utilized in different ORMs
* Create items, store them to a consultation, and flush them to the database
* Use SQLAlchemy to version item orientated inheritance
* offer a declarative, energetic list trend to be used with SQLAlchemy utilizing the Elixir extension
* Use the SQLSoup extension to supply an automated metadata and item version in keeping with database mirrored image

In addition, you'll find out how and whilst to take advantage of different extensions to SQLAlchemy, together with AssociationProxy, OrderingList, and more.

Essential SQLAlchemy is the much-needed advisor for each Python developer utilizing this code library. rather than a feature-by-feature documentation, this e-book takes an "essentials" technique that provides you precisely what you must develop into efficient with SQLAlchemy correct away.

Mastering Regular Expressions (3rd Edition)

Regular expressions are an incredibly strong software for manipulating textual content and information. they're now ordinary good points in a variety of languages and renowned instruments, together with Perl, Python, Ruby, Java, VB. internet and C# (and any language utilizing the . internet Framework), personal home page, and MySQL.

for those who don't use typical expressions but, you will find during this booklet an entire new global of mastery over your information. if you happen to already use them, you'll delight in this book's unparalleled element and breadth of insurance. in the event you imagine you recognize all you must find out about standard expressions, this ebook is a gorgeous eye-opener.

As this ebook exhibits, a command of normal expressions is a useful ability. standard expressions let you code complicated and sophisticated textual content processing that you simply by no means imagined can be automatic. common expressions can prevent time and aggravation. they are often used to craft based ideas to a variety of difficulties. as soon as you've mastered average expressions, they'll develop into a useful a part of your toolkit. you'll ask yourself the way you ever bought via with no them.

but regardless of their broad availability, flexibility, and remarkable energy, normal expressions are often underutilized. but what's strength within the palms of a professional might be fraught with peril for the unwary. studying standard Expressions may help you navigate the minefield to changing into a professional and assist you optimize your use of standard expressions.

studying commonplace Expressions, 3rd variation, now features a complete bankruptcy dedicated to personal home page and its strong and expressive suite of standard expression capabilities, as well as superior personal home page assurance within the valuable "core" chapters. in addition, this variation has been up-to-date all through to mirror advances in different languages, together with improved in-depth assurance of Sun's java. util. regex package deal, which has emerged because the normal Java regex implementation. subject matters include:
* A comparability of good points between diverse types of many languages and instruments
* How the normal expression engine works
* Optimization (major mark downs to be had the following! )
* Matching simply what you will want, yet no longer what you don't wish
* Sections and chapters on person languages

Written within the lucid, interesting tone that makes a posh, dry subject develop into crystal-clear to programmers, and sprinkled with ideas to complicated real-world difficulties, gaining knowledge of general Expressions, 3rd variation bargains a wealth info so you might positioned to rapid use.

Reviews of this re-creation and the second one edition:

"There isn't a greater (or extra important) e-book on hand on common expressions. "

--Zak Greant, handling Director, eZ Systems

"A genuine tour-de-force of a publication which not just covers the mechanics of regexes in outstanding element but additionally talks approximately potency and using regexes in Perl, Java, and . internet. .. in the event you use standard expressions as a part of your specialist paintings (even in case you have already got a very good ebook on no matter what language you're programming in) i'd strongly suggest this publication to you. "

--Dr. Chris Brown, Linux Format

"The writer does a very good activity top the reader from regex beginner to grasp. The booklet is very effortless to learn and chock jam-packed with valuable and appropriate examples. .. general expressions are invaluable instruments that each developer must have of their toolbox. learning average Expressions is the definitive advisor to the topic, and a good source that belongs on each programmer's bookshelf. Ten out of Ten Horseshoes. "

--Jason Menard, Java Ranch

Python Developer's Handbook

The Python Developer's guide is designed to reveal skilled builders to Python and its makes use of. starting with a quick advent to the language and its syntax, the publication strikes quick into extra complex programming themes, together with embedding Python, community programming, GUI toolkits, JPython, internet improvement, Python/C API, and extra.

Python 201: Intermediate Python

Python 201 is the sequel to my first publication, Python one zero one. if you happen to already recognize the fundamentals of Python and now you need to visit the following point, then this can be the ebook for you! This e-book is for intermediate point Python programmers merely. There will not be any newbie chapters right here. This ebook relies onPython three.

Additional info for Pro Python (2nd Edition)

Sample text

This step is implicitly performed inside many built-in functions, such as min(). If those functions are able to operate without building a complete list, you can use generators to improve dramatically performance over the use of other options. If they do have to create a new list, you’re not losing anything by delaying until the function really needs to create it. But notice what happens if you iterate over the generator twice. The second time through, you get an error that you tried to pass in an empty sequence.

Because no exceptions are raised, it doesn’t look like anything is actually broken in the code. Instead, it simply looks like the first value in the expression was false, because it’s returning the value that you would expect in that case. This may lead you to try to debug whatever code defines that value, rather than looking at the real problem, which is the value between the two operators. Ultimately, what makes it so hard to pin down is that you have to distrust your own code, removing any assumptions you may have had about how it should work.

Of course, you also won’t have the file available to your code, so it’d be of little use, but there’s nothing in Python that prevents you from doing so. If you include an as clause when using a context manager that doesn’t provide an object, the variable you define will simply be populated with None instead, because all functions return None if no other value is specified. There are several context managers available in Python, some of which will be detailed throughout the rest of this book. In addition, Chapter 5 shows how you can write your own context managers so that you can customize the contextual behavior to match the needs of your own code.

Download PDF sample

Rated 4.01 of 5 – based on 30 votes