Effective python 90 specific ways to write python better second edition brett slatkin

Effective Python. Second Edition

Effective Python: 90 Specific Ways to Write Better Python The Python programming language has unique strengths and charms that can be hard to grasp. Many programmers familiar with other languages often approach Python from a limited mindset instead of embracing its full expressivity. Some programmers go too far in the other direction, overusing Python features that can cause big prob- lems later.

This second edition of the Effective Python book will help you master a really «pythonic» approach to programming, harnesses python’s full power to write exceptionally well performing code. Using the concise scenerio driven style pioneered in scott meyers’ best selling effective c++, brett slatkin brings together 90 python best practices, tips, tricks, and shortcuts, and explain them with realistic code examples, so that you can embrace python with confidence.

Drawing on years of expertise developing Python infrastructure at Google, John Slatkin reveals little-known quirks and idiosyncrasies that powerfully impact code behavior. You’ll learn the best ways to accomplish common tasks so you can write better code that’s easier to understand, maintain and improve. In addition, this new edition substantially updates all items from the original edition to reflect current best practices.

Читайте также:  Java stringbuilder return string

Effective Python 2nd edition PDF

Each chapter in Effective Python: Second Edition contains a broader but related set of items, grouped into three parts. Feel free to jump back and forth between any two parts, and follow your interest. Part 1 covers topics such as what to do, what not to do, and how to strike the right mix. Part 2 covers topics such as how to organize code, how to structure data, and how to design APIs. Part 3 covers topics such as how you should test your code, how to debug your code, and how to improve your code. Items include advice on writing better Python programs, and references to each other so that you can fill in the gaps as needed.

“I have been recommending this book enthusiastically since the first edition appeared in 2015. This new edition, updated and expanded for Python 3, is a treasure trove of practical Python programming wisdom that can benefit pro- grammers of all experience levels.”
Wes McKinney, Creator of Python Pandas project, Director of Ursa Labs

“If you’re coming from another language, this is your definitive guide to taking full advantage of the unique features Python has to offer. I’ve been working with Python for nearly twenty years and I still learned a bunch of useful tricks, espe- cially around newer features introduced by Python 3. Effective Python is crammed with actionable advice, and really helps define what our community means when they talk about Pythonic code.”
Simon Willison, Co-creator of Django

“I’ve been programming in Python for years and thought I knew it pretty well. Thanks to this treasure trove of tips and techniques, I’ve discovered many ways to improve my Python code to make it faster (e.g., using bisect to search sorted lists), easier to read (e.g., enforcing keyword-only arguments), less prone to error (e.g., unpacking with starred expressions), and more Pythonic (e.g., using zip to iterate over lists in parallel). Plus, the second edition is a great way to quickly get up to speed on Python 3 features, such as the walrus operator, f-strings, and the typing module.”
Pamela Fox, Creator of Khan Academy programming courses

Читайте также:  Работа со стеком java

“Now that Python 3 has finally become the standard version of Python, it’s already gone through eight minor releases and a lot of new features have been added throughout. Brett Slatkin returns with a second edition of Effective Python with a huge new list of Python idioms and straightforward recommendations, catching up with everything that’s introduced in version 3 all the way through 3.8 that we’ll all want to use as we finally leave Python 2 behind. Early sections lay out an enormous list of tips regarding new Python 3 syntaxes and concepts like string and byte objects, f-strings, assignment expressions (and their special nickname you might not know), and catch-all unpacking of tuples. Later sec- tions take on bigger subjects, all of which are packed with things I either didn’t know or which I’m always trying to teach to others, including ‘Metaclasses and Attributes’ (good advice includes ‘Prefer Class Decorators over Metaclasses’ and also introduces a new magic method ‘__init_subclass__()’ I wasn’t familiar with), ‘Concurrency’ (favorite advice: ‘Use Threads for Blocking I/O, but not Parallel- ism,’ but it also covers asyncio and coroutines correctly) and ‘Robustness and Performance’ (advice given: ‘Profile before Optimizing’). It’s a joy to go through each section as everything I read is terrific best practice information smartly stated, and I’m considering quoting from this book in the future as it has such great advice all throughout. This is the definite winner for the ‘if you only read one Python book this year. ’ contest.
Mike Bayer, Creator of SQLAlchemy

Effective Python second edition reviews

Review by Michael E Sweeney

The chapter about concurrence is somewhat confusing as the asynchronous and co-routines examples overlap, and I spent time sorting through hundreds of line of code on the github page guessing which functions, class etc. pertain to each example (s). When you finally sorted it out, he said «But what if the situations were more complicated?»

Review by Carl

What an awesome book! That teaches you some really cool Code, in examples that are Easy Follow & To the Point. Hands Down My Favorite Python Book.

Review by Darrell

I started programming in C, C++) and java around 1995. My job has also recently shifted to more python. Python wasn’t difficult to pick up, almost felt like cheating writing code, but I was writing python like I would write C/C++. Looking at others’ code a lot of their coding choices didn’t make sense. This book does a great deal of explaining a lot of python best practices and quirks.

See also

Best Python online courses for 2022

Best laptop for Solidworks

© 2017—2023
Python Engineering Hub

Python.Engineering is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com

Источник

Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition

Effective Python: 90 Specific Ways to Write Better Python, 2nd Edition Front Cover

It’s easy to start developing programs with Python, which is why the language is so popular. However, Python’s unique strengths, charms, and expressiveness can be hard to grasp, and there are hidden pitfalls that can easily trip you up.

This second edition of Effective Python will help you master a truly “Pythonic” approach to programming, harnessing Python’s full power to write exceptionally robust and well-performing code. Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 90 Python best practices, tips, and shortcuts, and explains them with realistic code examples so that you can embrace Python with confidence.

Drawing on years of experience building Python infrastructure at Google, Slatkin uncovers little-known quirks and idioms that powerfully impact code behavior and performance. You’ll understand the best way to accomplish key tasks so you can write code that’s easier to understand, maintain, and improve. In addition to even more advice, this new edition substantially revises all items from the first edition to reflect how best practices have evolved.

  • 30 new actionable guidelines for all major areas of Python
  • Detailed explanations and examples of statements, expressions, and built-in types
  • Best practices for writing functions that clarify intention, promote reuse, and avoid bugs
  • Better techniques and idioms for using comprehensions and generator functions
  • Coverage of how to accurately express behaviors with classes and interfaces
  • Guidance on how to avoid pitfalls with metaclasses and dynamic attributes
  • More efficient and clear approaches to concurrency and parallelism
  • Solutions for optimizing and hardening to maximize performance and quality
  • Techniques and built-in modules that aid in debugging and testing
  • Tools and best practices for collaborative development

Effective Python will prepare growing programmers to make a big impact using Python.

Источник

Effective python 90 specific ways to write python better second edition brett slatkin

Language

Book cover of Effective Python: 90 Specific Ways to Write Better Python by Brett Slatkin

Book description (click to open)

Updated and Expanded for Python 3

It’s easy to start developing programs with Python, which is why the language is so popular. However, Python’s unique strengths, charms, and expressiveness can be hard to grasp, and there are hidden pitfalls that can easily trip you up.

This second edition of Effective Python will help you master a truly “Pythonic” approach to programming, harnessing Python’s full power to write exceptionally robust and well-performing code. Using the concise, scenario-driven style pioneered in Scott Meyers’ best-selling Effective C++, Brett Slatkin brings together 90 Python best practices, tips, and shortcuts, and explains them with realistic code examples so that you can embrace Python with confidence.

Drawing on years of experience building Python infrastructure at Google, Slatkin uncovers little-known quirks and idioms that powerfully impact code behavior and performance. You’ll understand the best way to accomplish key tasks so you can write code that’s easier to understand, maintain, and improve. In addition to even more advice, this new edition substantially revises all items from the first edition to reflect how best practices have evolved.

  • 30 new actionable guidelines for all major areas of Python
  • Detailed explanations and examples of statements, expressions, and built-in types
  • Best practices for writing functions that clarify intention, promote reuse, and avoid bugs
  • Better techniques and idioms for using comprehensions and generator functions
  • Coverage of how to accurately express behaviors with classes and interfaces
  • Guidance on how to avoid pitfalls with metaclasses and dynamic attributes
  • More efficient and clear approaches to concurrency and parallelism
  • Solutions for optimizing and hardening to maximize performance and quality
  • Techniques and built-in modules that aid in debugging and testing
  • Tools and best practices for collaborative development

See 2 Author Credentials

The author Brett Slatkin has the following credentials.

Источник

Оцените статью